springheel.splitseps module¶
Split a string at arbitary separators.
-
springheel.splitseps.
splitAtSeparators
(thing_to_check: str, separators: List[str]) → List[str]¶ Split a string if it contains any of a number of separators.
Similar in functionality to splitlines() but with arbitrary separators, so that it works on double linebreaks, for example. Keep in mind that it does indeed use the first separator present and construct the separators parameter accordingly.
- Parameters
- thing_to_checkstr
The string to work on.
- separatorslist of str
A list of separators to use.
- Returns
- list of str
The elements of the string, split with the first separator found in the separator list.