From 32c35951fa1f46f5d6f2c169576a3db86b0dc0f4 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Fri, 2 May 2025 20:33:51 +0200 Subject: sorter wip --- str_utils.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 str_utils.lua (limited to 'str_utils.lua') 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 } -- cgit v1.2.3-70-g09d2