diff options
author | ubq323 <ubq323@ubq323.website> | 2023-01-24 03:20:44 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-01-24 03:20:44 +0000 |
commit | b5484fc37c1f93654f95f21483d52229a34e6330 (patch) | |
tree | 2ea5088bb3859f7afdef4b46c7027acf48b7d524 /common |
things
Diffstat (limited to 'common')
-rw-r--r-- | common/words.lua | 17 |
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, +} + |