Skip to main content

Adds padding to the right or left of a given string

Project description

https://travis-ci.org/scisco/wordpad.svg?branch=master

Adds padding to the right or left of a given string

Installation

$ pip install wordpad

or:

$ python setup.py install

Tests

$ python setup.py test

Example

>>> from wordpad import pad
>>> pad('1', 3)
'001'
>>> pad('1', 3, direction='right')
'100'
>>> pad('his', 4, char='t')
'this'

Supported by

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