Skip to content

scisco/wordpad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wordpad

image

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'