diff options
Diffstat (limited to 'tex/context/base/syst-aux.lua')
-rw-r--r-- | tex/context/base/syst-aux.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tex/context/base/syst-aux.lua b/tex/context/base/syst-aux.lua index f9c0dfc1c..9ef28996a 100644 --- a/tex/context/base/syst-aux.lua +++ b/tex/context/base/syst-aux.lua @@ -29,6 +29,15 @@ function commands.getfirstcharacter(str) setvalue("remainingcharacters",rest) end +function commands.thefirstcharacter(str) + local first, rest = lpegmatch(pattern,str) + context(first) +end +function commands.theremainingcharacters(str) + local first, rest = lpegmatch(pattern,str) + context(rest) +end + local pattern = C(utf8char^-1) function commands.doiffirstcharelse(chr,str) |