String Utilities
Module: ppc_robot_lib.utils.strings
- class FirstMatchSplitter(separators, sort_separators=True, remember_separator=False, filter_empty=True)[source]
Advanced first matched separator text splitter.
Usage, see unit tests in :module:`test_first_match_splitter`.
- Parameters:
separators (
str
|Iterable
[str
]) – single or multiple separators trying to match in a value.sort_separators – sort
separators
by length in reverse order to match separators in sentences with better equality as first.remember_separator – remember first matched separator to be used for every next
split()
call.filter_empty – filter out empty elements on split (see
split()
).