summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-l-string.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-10-29 07:14:40 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2015-10-29 07:14:40 +0100
commit4f053696e1813fde4bd6cebbb77ff2a1e1f6800b (patch)
tree308ec3223eec7744136e95c40284602ba35efacc /src/fontloader/misc/fontloader-l-string.lua
parentd7a36a33d8d57a5aec9232364cf0bd307523281c (diff)
downloadluaotfload-4f053696e1813fde4bd6cebbb77ff2a1e1f6800b.tar.gz
[fontloader] sync with Context as of 2015-10-29
Diffstat (limited to 'src/fontloader/misc/fontloader-l-string.lua')
-rw-r--r--src/fontloader/misc/fontloader-l-string.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fontloader/misc/fontloader-l-string.lua b/src/fontloader/misc/fontloader-l-string.lua
index 70c66f6..e9dc2bb 100644
--- a/src/fontloader/misc/fontloader-l-string.lua
+++ b/src/fontloader/misc/fontloader-l-string.lua
@@ -192,10 +192,11 @@ string.itself = function(s) return s end
-- also handy (see utf variant)
-local pattern = Ct(C(1)^0) -- string and not utf !
+local pattern_c = Ct( C(1) ^0) -- string and not utf !
+local pattern_b = Ct((C(1)/byte)^0)
-function string.totable(str)
- return lpegmatch(pattern,str)
+function string.totable(str,bytes)
+ return lpegmatch(bytes and pattern_b or pattern_c,str)
end
-- handy from within tex: