Skip to main content

Python string extension

Project description

This package contains many helper functions to manipulate strings.

Read the fabulous doc here

Quickstart

To install:

pip install pystrext

Usage:

>>> import pystrext as strext
>>> h,m,s = strext.extracts('elapse time : 5h 7m 36s','(\d+)h (\d+)m (\d+)s',['0']*3)
>>> h,m,s
('5', '7', '36')
>>> print strext.no_one_many(0,"No item","One item","%(n)s items")
No item
>>> print strext.no_one_many(1,"No item","One item","%(n)s items")
One item
>>> print strext.no_one_many(36,"No item","One item","%(n)s items")
36 items

… more functions available : read the doc

News

0.1.7 (2015-01-02)

  • add CHANGES.rst file
  • add a Quickstat in documentation

0.1.6 (2015-01-01)

  • add docstrings
  • add sphinx doc

0.1.1 (2014-12-30)

  • First commit
  • No doc

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pystrext, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size pystrext-0.1.7.tar.gz (13.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page