commonlibs.strings package

Submodules

commonlibs.strings.strings module

String manipulation

commonlibs.strings.strings.is_string_in_file(string, filepath)[source]

Check if a string is in a file

Args:
string

string to search for

filepath

path of file

Returns:
is_found

True if found, False otherwise

commonlibs.strings.strings.sed_like_replace(filename, replacement_list)[source]

Replace expressions in a “sed”-like style

Args:
filename

name of file to modify

replacement_list

list of lists, each entry with [“old”, “new”]

commonlibs.strings.strings.string_replace(replacement_list, string)[source]

Replace multiple expressions in a string

Args:
replacement_list

list of lists, each entry with [“old”, “new”]

string

string to modify

Returns:
mod_string

modified string

Module contents