diff options
Diffstat (limited to 'util.lua')
-rw-r--r-- | util.lua | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/util.lua b/util.lua index a13912c..7040e33 100644 --- a/util.lua +++ b/util.lua | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | local m = {} | 3 | local m = {} |
4 | local string = string | 4 | local string = string |
5 | local utf8 = require("utf8") | ||
6 | 5 | ||
7 | m.luaerror = error | 6 | m.luaerror = error |
8 | 7 | ||
@@ -23,17 +22,5 @@ function m.pop (tbl) | |||
23 | return table.remove(tbl, 1) | 22 | return table.remove(tbl, 1) |
24 | end | 23 | end |
25 | 24 | ||
26 | function m.tochars (str) | ||
27 | local cs = {} | ||
28 | for _, code in utf8.codes(str) do | ||
29 | table.insert(cs, code) | ||
30 | end | ||
31 | return cs | ||
32 | end | ||
33 | |||
34 | function m.constantly (x) | ||
35 | return function () return x end | ||
36 | end | ||
37 | |||
38 | -------- | 25 | -------- |
39 | return m | 26 | return m |