utf8
*이 콘텐츠는 AI(베타)를 사용해 번역되었으며, 오류가 있을 수 있습니다. 이 페이지를 영어로 보려면 여기를 클릭하세요.
요약
함수
nfcnormalize(str: string):string |
nfdnormalize(str: string):string |
API 참조
함수
codes
codepoint
len
offset
graphemes
반환
코드 샘플
UTF-8 그래프
-- "e" 다음에 결합된 아크센트가 있는 것은 하나의 그래프이지만 두 개의 코드 포인트입니다.
local str = "ae\u{0301}b"
print(utf8.len(str)) --> 4
for first, last in utf8.graphemes(str) do
local grapheme = string.sub(str, first, last)
print(first, last, #grapheme)
end
--> 1 1 1
--> 2 4 3
--> 5 5 1nfcnormalize
속성