retype.extras.str_subclasses.ManifoldStr
- class retype.extras.str_subclasses.ManifoldStr(data, rdict)[source]
- __init__(data, rdict)[source]
A string structure that takes an str `data’ and a dictionary `rdict’ where each key is a substring to be replaced, and corresponding value is an array of possible replacements of equal length. Each key in `replacement_dict’ is replaced where found in `data’ with an AnyStr containing key and replacements.
Methods
__init__(data, rdict)A string structure that takes an str `data' and a dictionary `rdict' where each key is a substring to be replaced, and corresponding value is an array of possible replacements of equal length. Each key in `replacement_dict' is replaced where found in `data' with an AnyStr containing key and replacements.
by_parts(data, rdict, manifold)capitalize()casefold()center(width, *args)count(value)encode([encoding, errors])endswith(suffix[, start, end])expandtabs([tabsize])find(sub[, start, end])format(*args, **kwds)format_map(mapping)from_anystr_and_anystr(anystr1, anystr2)from_anystr_and_ms(anystr, ms)from_anystr_and_str(anystr, str_)from_ms_and_anystr(ms, anystr[, order])from_ms_and_ms(ms1, ms2)from_ms_and_str(ms, str_[, order])from_str_and_anystr(str_, anystr[, order])from_str_and_ms(str_, ms)index(value, [start, [stop]])Raises ValueError if the value is not present.
isalnum()isalpha()isascii()isdecimal()isdigit()isidentifier()islower()isnumeric()isprintable()isspace()istitle()isupper()join(iterable)ljust(width, *args)lower()lstrip([chars])maketrans([y, z])Return a translation table usable for str.translate().
partition(sep)replace(old, new[, maxsplit])rfind(sub[, start, end])rindex(sub[, start, end])rjust(width, *args)rpartition(sep)rsplit([sep, maxsplit])rstrip([chars])split([sep, maxsplit])splitlines([keepends])startswith(prefix[, start, end])strip([chars, directions])swapcase()title()translate(*args)upper()zfill(width)