Skip to main content

A helper package for expanding strings

Project description

expand_string

This library provides functions that allow you to expand a string that contains parenthesis with numeric-values, and then expands that into an actual string value.

Installation

$ pip install expand_string

Usage

Simple example:

from expand_string import expand_string

expand_string('N3(S)N2(E3(NW))')

Would result in the output:

NSSSNENWNWNWENWNWNW

Shell example:

python -m expand_string 'N3(S)N2(E3(NW))'

Would result in the output:

NSSSNENWNWNWENWNWNW

For more details see the expand_string docstring.

Project details


Download files

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

Source Distribution

expand_string-0.0.1.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distributions

expand_string-0.0.1-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

expand_string-0.0.1-py2-none-any.whl (3.6 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page