익명 사용자
모듈:UnicodeBlock: 두 판 사이의 차이
편집 요약 없음
편집 요약 없음 |
편집 요약 없음 |
||
| 268번째 줄: | 268번째 줄: | ||
local p = {} | local p = {} | ||
function p.main(data) | function p.main(data) | ||
local char | |||
if type(data) == 'table' then | if type(data) == 'table' then | ||
char = data.args[1] | |||
local codepoint = mw.ustring.codepoint(char) | else | ||
char = data | |||
end | |||
local codepoint = mw.ustring.codepoint(char) | |||
codepoint = codepoint, '16' | |||
for n= 1, endN do | |||
local start_ = tonumber(uniBlock[n][1], 16) | |||
local end_ = tonumber(uniBlock[n][2], 16) | |||
if start_ <= codepoint and codepoint <= end_ then | |||
return uniBlock[n][3] | |||
end | end | ||
end | end | ||
end | end | ||
return p | return p | ||