diff options
Diffstat (limited to 'nerv/tnn/sutil.lua')
-rw-r--r-- | nerv/tnn/sutil.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nerv/tnn/sutil.lua b/nerv/tnn/sutil.lua index f5bc408..d88bd8e 100644 --- a/nerv/tnn/sutil.lua +++ b/nerv/tnn/sutil.lua @@ -50,3 +50,15 @@ function Util.sche_get(s, it) return s[#s] end end + +function Util.parse_commands_set(str) + local coms = {} + local s = Util.simple_split(str, ':,') + for i = 1 ,#s do + if coms[s[i]] == 1 then + nerv.warning("nerv.SUtil.parse_commands_set command(%s) appered more than once in command_set(%s)", s[i], str) + end + coms[s[i]] = 1 + end + return coms +end |