From b5484fc37c1f93654f95f21483d52229a34e6330 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Tue, 24 Jan 2023 03:20:44 +0000 Subject: things --- common/words.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 common/words.lua (limited to 'common/words.lua') diff --git a/common/words.lua b/common/words.lua new file mode 100644 index 0000000..4d6904e --- /dev/null +++ b/common/words.lua @@ -0,0 +1,17 @@ +local function join(...) + return table.concat({...}," ") +end + +local function split(s) + local o = {} + for w in string.gmatch(s,"(%S+)") do + table.insert(o,w) + end + return o +end + +return { + join=join, + split=split, +} + -- cgit v1.2.3