Шаблон:Numcr2namecr/doc
Этот шаблон предлагается к удалению. Пояснение причин и соответствующее обсуждение вы можете найти на странице Википедия:К удалению/25 марта 2016.
Пока процесс обсуждения не завершён, страницу можно попытаться улучшить, однако следует воздерживаться от переименований или немотивированного удаления содержания, подробнее см. руководство к дальнейшему действию. Не снимайте пометку о выставлении на удаление до окончания обсуждения. Последнее изменение сделано участником WindEwriX (вклад, журналы) в 18:44 UTC (4212127 минут назад). Администраторам: ссылки сюда, история, журналы, удалить. |
Шаблон:Numcr2namecr · Документация · Обсуждение · Где используется (использование шаблона параметры)
Использование
Этот шаблон преобразует numerical character reference into a named character reference. It converts a number to the named character reference for HTML, also often called a "character entity". The input number can be decimal or hexadecimal.
-
{{Numcr2namecr|A0}}
--> -
{{Numcr2namecr|160|base=dec}}
-->
By default the numeric base is presumed to be hexadecimal. When the base is decimal, it needs to be specified using "base=dec"
When the number has no related named character, an blank is presented. This message can be overruled:
-
{{Numcr2namecr|61}}
--> -
{{Numcr2namecr|61|notfoundmsg=Not named}}
--> Not named
Параметры
- Первый парметр, 1= Unnamed, required. Numerical value in hex or decimal. Hexadecimal can have the prefix "0x". Input like   (expected output ) can not be processed.
- base= Required when base=decimal, default base=hex. When the input number (parameter 1) is decimal, the base= must be defined through: "base=dec", "base=d", "base=10".
- For clarity in code, the hex base may be defined as well: "base=hex", "base=h", "base=16". The base is also hexadecimal when the prefix "0x" is used with the number.
- notfoundmsg= Optional message, default= (blank). Will be returned when the value does not have a named reference.
-
{{numcr2namecr|61}}
--> -
{{numcr2namecr|61|notfoundmsg=Cannot find the name}}
--> Cannot find the name
Техническое замечание
Шаблон обращается к подстранице {{numcr2namecr/listbydec}}
, которая содержит список всех ссылок 252 символов. Шестнадцатеричный-десятичных расчеты выполняются {{hex2dec}}
и {{hexadecimal}}
.
См. также
- List of XML and HTML character entity references gives background and an overview