This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

remove_hairs

Function form removing characters from both sides of string.

Documentation

There is just one function remove_hairs() and one decorator remove_hairs_decorator().

remove_hairs()

This function is useful, when you have string and you need to remove some characters from both sides of the string.

>>> from remove_hairs import remove_hairs
>>> remove_hairs(",a-sd,-/")
'a-sd'

By default, the function uses set of characters defined in .HAIRS, which is defined as /:;,- []<>(). You can change that using hairs parameter:

>>> remove_hairs(" - a sd: --", " -")
'a sd:'

remove_hairs_decorator()

As the name say, remove_hairs_decorator() is just decorator for remove_hairs():

@remove_hairs_decorator
def x():
    return ",a-sd,-/"

assert x() == "a-sd"

Or with hairs parameter:

@remove_hairs_decorator(hairs=" -")
def y():
    return " - a sd: --"

assert y() == "a sd:"

Installation

The code is hosted at PYPI, and you can easily install it using the following command:

sudo pip install remove_hairs

Testing

This project uses py.test for testing. Just run py.test from the root of the project:

$ py.test
============================= test session starts ==============================
platform linux2 -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
collected 2 items

tests/test_remove_hairs.py ..

=========================== 2 passed in 0.02 seconds ===========================

Changelog

1.0.1

  • Fixed setup.py.

1.0.0

  • Project created.
Release History

Release History

1.0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
remove_hairs-1.0.1.tar.gz (4.1 kB) Copy SHA256 Checksum SHA256 Source Mar 24, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting