summaryrefslogtreecommitdiff
path: root/tex/context/base/l-lpeg.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/l-lpeg.lua')
-rw-r--r--tex/context/base/l-lpeg.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/tex/context/base/l-lpeg.lua b/tex/context/base/l-lpeg.lua
index 9e59194e8..f7e8ad7b1 100644
--- a/tex/context/base/l-lpeg.lua
+++ b/tex/context/base/l-lpeg.lua
@@ -186,6 +186,13 @@ end
lpeg.splitat = splitat
lpeg.tsplitat = tsplitat
+function string.splitup(str,separator)
+ if not separator then
+ separator = ","
+ end
+ return match(splitters_m[separator] or splitat(separator),str)
+end
+
--~ local p = splitat("->",false) print(match(p,"oeps->what->more")) -- oeps what more
--~ local p = splitat("->",true) print(match(p,"oeps->what->more")) -- oeps what->more
--~ local p = splitat("->",false) print(match(p,"oeps")) -- oeps