Skip to main content

A functional string utility library for Python

Project description

A functional string utility library for Python 2 and 3. Closely inspired by implementations in Haskell and PHP.

For more documentation, please see http://stringutils.readthedocs.io.

Note

This package is still in an early development stage, and it is possible that the naming and API of some functions will change.

Features

The main design goal of this library is to provide helpful string functions which complement what can already be done with str, str.format and textwrap. As such, it includes:

  • A selective set of additional string helper functions.
  • Extended versions of existing str methods as functions where useful.

Installation

Install the latest release from PyPI:

pip install stringutils

Usage

All functions are available directly off the stringutils package. You may choose to import individual functions by name, or import all.

from stringutils import reverse, unwords, words

def reverse_words(string):
    return unwords(map(reverse, words(string)))

License

The project is licensed under the MIT license.

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
stringutils-0.3.0-py2.py3-none-any.whl (5.5 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Feb 4, 2018
stringutils-0.3.0.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None Feb 4, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page