summaryrefslogtreecommitdiff
path: root/tex/context/base/char-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2014-05-12 16:53:00 +0200
committerHans Hagen <pragma@wxs.nl>2014-05-12 16:53:00 +0200
commitc9aa90b46d3adfff6a0522c4f9ff2a76d296d08e (patch)
tree96273adfeaf33f085eef79fc657cc6acbf6a6df0 /tex/context/base/char-ini.lua
parent04b23cb87054eddbf5ca32635848480f69bae502 (diff)
downloadcontext-c9aa90b46d3adfff6a0522c4f9ff2a76d296d08e.tar.gz
beta 2014.05.12 16:53
Diffstat (limited to 'tex/context/base/char-ini.lua')
-rw-r--r--tex/context/base/char-ini.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/tex/context/base/char-ini.lua b/tex/context/base/char-ini.lua
index d6e8d18a9..1cfeb0596 100644
--- a/tex/context/base/char-ini.lua
+++ b/tex/context/base/char-ini.lua
@@ -776,6 +776,17 @@ function characters.lower (str) return lpegmatch(tolower,str) end
function characters.upper (str) return lpegmatch(toupper,str) end
function characters.shaped(str) return lpegmatch(toshape,str) end
+-- maybe: (twice as fast when much ascii)
+--
+-- local tolower = lpeg.patterns.tolower
+-- local lower = string.lower
+--
+-- local allascii = R("\000\127")^1 * P(-1)
+--
+-- function characters.checkedlower(str)
+-- return lpegmatch(allascii,str) and lower(str) or lpegmatch(tolower,str) or str
+-- end
+
function characters.lettered(str,spacing)
local new, n = { }, 0
if spacing then