Skip to content

ttivy/str-replacer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Replace many strings at once.

Installation

$ pip install git+https://github.com/ttivy/str-replacer.git

or

$ git clone https://github.com/ttivy/str-replacer.git
$ cd str-replacer
$ python setup.py install

Requirements

Usage

import replacer

replacements = {
    'src': '<dst>',
    'SRC': '<DST>',
}
r = replacer.Replacer(replacements)

r.replace('abcsrcdefABCSRCDEF')
# abc<dst>defABC<DST>DEF

About

Replace many strings at once.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages