diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-05-12 22:08:36 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-05-12 22:08:36 +0200 |
commit | 63c1181d3b3baf82e48ab28cd6a66230903423de (patch) | |
tree | b81298e2dc00f3d1018c566d2ad426ed3b93e025 /tex/context/base/char-ini.lua | |
parent | 83222078cd1f2f9d2c12279653c48dfd70390f1c (diff) | |
download | context-63c1181d3b3baf82e48ab28cd6a66230903423de.tar.gz |
2014-05-12 16:55:00
Diffstat (limited to 'tex/context/base/char-ini.lua')
-rw-r--r-- | tex/context/base/char-ini.lua | 11 |
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 |