diff options
Diffstat (limited to 'common/words.lua')
-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, +} + |