summaryrefslogtreecommitdiff
path: root/common/words.lua
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-01-24 03:20:44 +0000
committerubq323 <ubq323@ubq323.website>2023-01-24 03:20:44 +0000
commitb5484fc37c1f93654f95f21483d52229a34e6330 (patch)
tree2ea5088bb3859f7afdef4b46c7027acf48b7d524 /common/words.lua
things
Diffstat (limited to 'common/words.lua')
-rw-r--r--common/words.lua17
1 files changed, 17 insertions, 0 deletions
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,
+}
+