diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2023-02-22 20:22:49 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-22 20:22:49 -0500 |
| commit | 8cdfaf099864e76a487ce77712ee54682e4a091f (patch) | |
| tree | 6fd43b320f53d4f81a40c0097091f8e4baaa31ac /lib/utils/string.py | |
| parent | e559af72480858c32f5df57f7f6a0d653718ebf8 (diff) | |
| parent | 92dff9f359f19c57ce63046a85cbd40746e50a32 (diff) | |
Merge pull request #1803 from inkstitch/lexelby/smoothing
Meander fill
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 |
