summaryrefslogtreecommitdiff
path: root/lib/utils/string.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-11-14 20:23:06 -0500
committerGitHub <noreply@github.com>2018-11-14 20:23:06 -0500
commitf5c85183d9c874fca806917e50992daea4101496 (patch)
treea2450e2e37a7d94625a917240e78eadc939fd65b /lib/utils/string.py
parent238ad843dd658de6c7afd5b8697c0e080b1cf965 (diff)
basic lettering (#344)
Can handle multiple lines of text and routes the stitching in alternating directions on each line.
Diffstat (limited to 'lib/utils/string.py')
-rw-r--r--lib/utils/string.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/utils/string.py b/lib/utils/string.py
new file mode 100644
index 00000000..a7839f7d
--- /dev/null
+++ b/lib/utils/string.py
@@ -0,0 +1,5 @@
+def string_to_floats(string, delimiter=","):
+ """Convert a string of delimiter-separated floats into a list of floats."""
+
+ floats = string.split(delimiter)
+ return [float(num) for num in floats]