str
Collection of string related functions
Functions
contains
contains(text: str, *args) -> bool
Check if text contains all given substrings.
Parameters:
Returns:
-
bool(bool) –True if all substrings are found in the text.
Source code in ipsl_common/str.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
contains_any
contains_any(text: str, *args) -> bool
Check if text contains any of given substrings.
Parameters:
Returns:
-
bool(bool) –True if any of substrings is found in the text.
Source code in ipsl_common/str.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
is_float
is_float(text: str) -> bool
Check if text represents floating value.
Parameters:
-
(textstr) –Text to verify
Returns:
-
bool(bool) –True if text represents a floating value.
Source code in ipsl_common/str.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
is_int
is_int(text: str) -> bool
Check if text represents integer value.
Parameters:
-
(textstr) –Text to verify
Returns:
-
bool(bool) –True if text represents an integer value.
Source code in ipsl_common/str.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |