From 6be644ed9fe4fa893c0d561c6a25118aca548ae3 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 26 Mar 2016 13:57:02 -0400 Subject: Support UTF-8 Lua pattern matching. Makes use of an external luautf8 library, but only a subset of it. --- modules/lua/lua.luadoc | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'modules/lua/lua.luadoc') diff --git a/modules/lua/lua.luadoc b/modules/lua/lua.luadoc index f92adc48..8902482d 100644 --- a/modules/lua/lua.luadoc +++ b/modules/lua/lua.luadoc @@ -2046,3 +2046,39 @@ function lfs.touch(filepath [, atime [, mtime]]) end -- Returns true if the operation was successful; in case of error, it returns -- nil plus an error string. function lfs.unlock(filehandle[, start[, length]]) end + +--- +-- UTF-8 version of `string.byte`. +function utf8.byte(s [, i [, j]]) end + +--- +-- UTF-8 version of `string.find`. +function utf8.find(s, pattern [, init [, plain]]) end + +--- +-- UTF-8 version of `string.gmatch`. +function utf8.gmatch(s, pattern) end + +--- +-- UTF-8 version of `string.gsub`. +function utf8.gsub(s, pattern, repl [, n]) end + +--- +-- UTF-8 version of `string.lower`. +function utf8.lower(s) end + +--- +-- UTF-8 version of `string.match`. +function utf8.match(s, pattern [, init]) end + +--- +-- UTF-8 version of `string.reverse`. +function utf8.reverse(s) end + +--- +-- UTF-8 version of `string.sub`. +function utf8.sub(s, i [, j]) end + +--- +-- UTF-8 version of `string.upper`. +function utf8.upper(s) end -- cgit v1.2.3