diff options
| author | Lex Neva <github.com@lexneva.name> | 2023-01-17 21:44:23 -0500 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2023-02-20 15:27:55 -0500 |
| commit | 847e133f97d570e2967dfa7dcfc16a212dc2bbbc (patch) | |
| tree | df2fb20547bea95ad437155a1fac91290a9d07f3 /lib/utils/string.py | |
| parent | e2965e78f03fb41c9a02c92ef120caf038b837ae (diff) | |
meander fill: more work
Diffstat (limited to 'lib/utils/string.py')
| -rw-r--r-- | lib/utils/string.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/utils/string.py b/lib/utils/string.py index cb852ce3..e9204076 100644 --- a/lib/utils/string.py +++ b/lib/utils/string.py @@ -8,3 +8,10 @@ def string_to_floats(string, delimiter=","): floats = string.split(delimiter) return [float(num) for num in floats] + + +def remove_suffix(string, suffix): + if string.endswith(suffix): + return string[:-len(suffix)] + else: + return string |
