From 52f2051b51fdf9f56c8a19b4884bfef8787b9af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 23 Sep 2020 17:51:56 +0800 Subject: =?UTF-8?q?=E6=BC=8F=E6=8E=89=E7=9A=84=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locale/en-US/libs/@lua/utf8.lni | 2 ++ 1 file changed, 2 insertions(+) (limited to 'locale/en-US/libs') diff --git a/locale/en-US/libs/@lua/utf8.lni b/locale/en-US/libs/@lua/utf8.lni index c7ab9bf3..c0fb3c27 100644 --- a/locale/en-US/libs/@lua/utf8.lni +++ b/locale/en-US/libs/@lua/utf8.lni @@ -7,11 +7,13 @@ description = 'The pattern which matches exactly one UTF-8 byte sequence, assumi [codes] description = [[ -------- +Returns values so that the construction ```lua for p, c in utf8.codes(s) do body end ``` +will iterate over all UTF-8 characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence. ]] ["codes Lua 5.4"] -- cgit v1.2.3