{{#css: .template-documentation {

   clear: both;
   margin: 1em 0 0 0;
   padding: 1em

} /* 아래 상자 */ .mbox-text {

   clear: both;
   background-color: #e8ffe8;

}

.template-documentation-template-data .mw-templatedata-doc-desc {

   display: none;

}

}}

설명문서 [보기] [편집] [역사] [새로 고침]

모듈:Unicode을 이용합니다. 스크립트 오류: 함수 "uni_char"가 존재하지 않습니다. {{유니코드문자|[}}

가장 간단한 코드입니다. 유니코드는 자동으로 입력되므로 입력하실 필요가 없습니다.

스크립트 오류: 함수 "uni_char"가 존재하지 않습니다.

{{유니코드문자|이름=왼쪽 대괄호|[}}

아래는 가능한 모든 변수들을 나열한 것입니다. 스크립트 오류: 함수 "uni_char"가 존재하지 않습니다.


{{유니코드문자
|이름=왼쪽 대괄호
|이전= Z
|문자=[
|이후= \
|이후이름= 역슬래시
|영어이름= Left Square Bracket}}
위 설명은 모듈:Unicode/설명문서의 내용을 가져와 보여주고 있습니다.
연습장이나 사용자 문서에서 틀의 사용이나 수정을 연습할 수 있습니다.
분류는 /설명문서에 넣어주세요. 이 틀의 하위문서.

local ustring = mw.ustring
local getArgs = require('Module:Arguments').getArgs
local p = {}

-------------------------  codepoint  ------------------------------------------
function p.code( frame )
	local char = getArgs(frame)[1] or nil
	if char then
		return p.code_(char)
	else
		return '입력값이 없습니다.'
	end
end
function p.code_( char, base, offset )
	if type(char) == 'string' then
		if offset == nil then offset = 0 end
		local baseformat, head
		if base == '10' then
			baseformat = '%d'; head = 'U+'
		elseif base == 'x16' then
			baseformat = '%x'; head = 0
			return tonumber(ustring.codepoint(char))
		else
			baseformat = '%x'; head = 'U+'
		end
		return head..ustring.upper(ustring.format(baseformat, ustring.codepoint(char) + offset))
	else
		return 0
	end
end
----------------------  next codepoint  ---------------------------------------
function p.nextcode( frame )
	local char = getArgs(frame)[1] or nil
	if char then
		return p.code_(char, '16', 1)
	else
		return '입력값이 없습니다.'
	end
end
----------------------  prev codepoint  ---------------------------------------
function p.prevcode( frame )
	local char = getArgs(frame)[1] or nil
	if char then
		return p.code_(char, '16', -1)
	else
		return '입력값이 없습니다.'
	end
end
----------------------  next char  ---------------------------------------
function p.nextchar( frame )
	local char = getArgs(frame)[1] or nil
	if char then
		return ustring.char(p.code_(char, 'x16', 1))
	else
		return '입력값이 없습니다.'
	end
end
----------------------  prev char  ---------------------------------------
function p.prevchar( frame )
	local char = getArgs(frame)[1] or nil
	if char then
		return ustring.char(p.code_(char, 'x16', -1))
	else
		return '입력값이 없습니다.'
	end
end
-- string.char
function p.char( frame )
	local args = getArgs(frame)
	local new_args = str._getParameters( args, { 'c' } )
	local c = tonumber(new_args['c'])
	return ustring.char( c )
end
return p