summaryrefslogtreecommitdiff
path: root/str_utils.lua
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2025-05-02 20:33:51 +0200
committerBotond Hende <nettingman@gmail.com>2025-05-02 20:33:51 +0200
commit32c35951fa1f46f5d6f2c169576a3db86b0dc0f4 (patch)
tree54ca5a5c6198ad3e4421c892e5277cf3c72cb77c /str_utils.lua
parent2f5e88fd789db0dc5c6f0db0c173ce818bd6ab37 (diff)
sorter wip
Diffstat (limited to 'str_utils.lua')
-rw-r--r--str_utils.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/str_utils.lua b/str_utils.lua
new file mode 100644
index 0000000..c45f16a
--- /dev/null
+++ b/str_utils.lua
@@ -0,0 +1,12 @@
+local function split(inputstr, sep)
+ if sep == nil then
+ sep = "%s"
+ end
+ local t = {}
+ for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
+ table.insert(t, str)
+ end
+ return t
+end
+
+return { split = split }