Автомобильные номера Невады: различия между версиями
Перейти к навигации
Перейти к поиску
/>Putnik |
Admin (обсуждение | вклад) (Новая страница: «Test») |
||
Строка 1: | Строка 1: | ||
{{ | {{Navbox with collapsible groups | ||
{{ | | name = String-handling templates | ||
| state = {{{state|uncollapsed}}} | |||
| bodyclass = | |||
| title = Шаблоны обработки строк (String-handling templates) | |||
| selected = {{{selected|{{{expanded|{{{1|}}}}}}}}} | |||
| abbr1 = Обрезка строки | |||
| sect1 = [[Trimming (computer programming)|Обрезка строки]] | |||
| list1 = | |||
{{Navbox |child | |||
| group1 = By counting | |||
| list1 = {{Aligned table |style=padding-right:0.5em; | |||
|col1style=width:12em; text-align:right;white-space:nowrap;padding-right:0.5em; | |||
|col2style=font-style:italic; | |||
| {{tp|_nav=x|str mid|строка|N|L}}| Возвращает подстроку длиной L, начиная с позиции N. <br><code><nowiki>{{str mid|строка|3|2}}</nowiki></code> → {{str mid|строка|3|2}} | |||
| {{tp|_nav=x|trunc|строка|N}}| Возвращает заданное количество символов с начала строки.<br> <code><nowiki>{{trunc|строка|3}}</nowiki></code> → {{trunc|строка|3}} | |||
| {{tp|_nav=x|str left|строка|N}}| Возвращает заданное количество символов с начала строки.<br> <code><nowiki>{{str left|строка|3}}</nowiki></code> → {{str left|строка|3}} | |||
= | | {{tp|_nav=x|str crop|строка|N}}| Удаляет справа из строки заданное количество символов.<br> <code><nowiki>{{str crop|строка|1}}</nowiki></code> → {{str crop|строка|1}} | ||
= | | {{tp|_nav=x|chop head and tail|строка|N}}| Удаляет с обеих сторон указанное число символов.<br> <code><nowiki>{{chop head and tail|строка|2}}</nowiki></code> → {{Chop head and tail|строка|2}} | ||
< | |||
</ | |||
< | | {{tp|_nav=x|str right|строка|N}} | Возвращает символы начиная с N и до конца строки.<br> <code><nowiki>{{str right|строка|2}}</nowiki></code> → {{Str right|строка|2}} | ||
[[Категория:Шаблоны:Работа со строками| | |||
</ | | {{tp|_nav=x|str rightc|строка|N}} | Возвращает правую часть строки из заданного количества символов. Результат как в {{t|str rightmost}}. | ||
| {{tp|_nav=x|str rightmost|строка|N}} | <code><nowiki>{{str rightmost|строка|3}}</nowiki></code> → {{str rightmost|строка|3}} | |||
| {{tp|_nav=x|str sub old|строка|N|L}} | Удаляет слева N символов и оставляет L. <br><code><nowiki>{{str sub old|строка|2|3}}</nowiki></code> → {{str sub old|строка|2|3}} | |||
| {{tp|_nav=x|str sub new|строка|N|L}} | Выборает подстроку из строки на основе выбранных индексов.<br><code><nowiki>{{str sub new|строка|3|5}}</nowiki></code> → {{str sub new|строка|3|5}} | |||
| {{tp|_nav=x|str index|строка|N}} | Возвращает из строки один символ под заданным номером N. <br> <code><nowiki>{{str index|строка|4}}</nowiki></code> → {{str index|строка|4}} | |||
}} | |||
| group2 = By checking | |||
| list2 = | |||
{{Aligned table |style=padding-right:0.5em; | |||
|col1style=width:12em; text-align:right; white-space:nowrap; padding-right:0.5em; | |||
|col2style=font-style:italic; | |||
| {{tnav|trim}} | Удаляет пробелы справа и слева. | |||
| {{tnav|str letter/trim}} | To trim down to the beginning letters. | |||
| {{tnav|str number/trim}} | To trim down to the beginning numbers. | |||
| {{tnav|trim brackets}} | To trim any leading or trailing square brackets. | |||
| {{tnav|first word}} | Возвращает первое слово в строке. | |||
| {{tnav|remove first word}} | To remove anything before the first space. | |||
| {{tnav|last word}} | To trim down from the last space. | |||
| {{tnav|remove last word}} | To remove anything after the last space. | |||
}} | |||
| group3 = Dedicated | |||
| list3 = | |||
{{Aligned table |style=padding-right:0.5em; | |||
|col1style=width:12em; text-align:right;white-space:nowrap;padding-right:0.5em; | |||
|col2style=font-style:italic; | |||
| {{tnav|delink}} | Removes wikilink brackets (wikicode). | |||
| {{tnav|remove file prefix}} | Removes "File:" (or "Image:") from filenames. | |||
| {{tnav|PAGENAMEBASE}} | To trim off any parenthesis text at the end of a string (disambiguation). | |||
| {{tnav|title disambig text}} | Returns text in parenthesis at the end of a string (disambiguation). | |||
| {{tnav|WikiProjectbasename}} | Removes "WikiProject" from a pagename. | |||
| {{tnav|remove unranked}} | Removes the string "unranked_" from the left of a string (taxonomy). | |||
| {{tnav|ship prefix}} | Returns the length of a ship's name prefix, if listed (ship names). | |||
| {{tnav|title year}} | Returns the 4-digit year from a pagename, if any. | |||
}} }} | |||
| abbr4 = Вставка и замена строк | |||
| group4 = Вставка и замена строк | |||
| list4 = | |||
{{Aligned table |style=padding-right:0.5em; | |||
|col1style=width:9em; text-align:right; white-space:nowrap; padding-right:0.5em; background:#F6F6F6; | |||
|col2style=text-align:left;font-style:italic; | |||
| {{tnav|strloc insert}} | Inserts a string at character location strloc, or appends if strloc<{{=}}0. | |||
| {{tnav|loop}} | Repeat character string a specified number of times. | |||
| {{tnav|repeat}} | Repeat a string a specified number of times. | |||
| {{tnav|replace}} | Returns the string, after replacing ''all'' occurrences of a specified string with another string. | |||
| {{tnav|str rep}} | Returns the string, after replacing the first occurrence of a specified string with another string. | |||
| {{tp|_nav=x|str len|строка}} | Возвращает длину строки. <code><nowiki>{{Str len|строка}}</nowiki></code> → {{Str len|строка}} | |||
|{{tnav|iflenge}} | [if len]gth [g]reater than or [e]qual to. | |||
|{{tnav|str ≥ len}} | To check if a string is "longer or equally long" or "shorter" than a given length. | |||
|{{tnav|str ≤ len}} | To check if a string is "shorter or equally long" or "longer" than a given length. | |||
|{{tnav|str ≠ len}} | To check if a string is "not equal" or "equal" to a given length. | |||
|{{tnav|str ≤ ≥ len}} | To check if a string is "shorter", "equal", or "longer" than a given length. | |||
}} | |||
| abbr5 = Analysis and technical | |||
| group5 = Analysis and technical | |||
| list5 = | |||
{{Aligned table |style=margin:0 auto 0; text-align:left; | |||
|col1style=width:9em; text-align:right; white-space:nowrap; padding-right:0.5em; background:#F6F6F6; | |||
|col2style= font-style:italic; | |||
| {{tnav|str endswith}} | To check if a string ends with a given string. | |||
| {{tnav|str find}}<br>{{tnav|strfind short}} | |||
|Позиция первого вхождения подстроки в текст. | |||
| {{tnav|str find0}} | Zero-based substring search. | |||
| {{tnav|str sub find}} | Searches a substring in a string at the given offset. | |||
| {{tnav|str letter}} | Returns the number of letters that begin a string. | |||
| {{tnav|str number}} | Returns the number of numbers that begin a string. | |||
| {{tnav|str gtr str}} | Compares two strings for alphabetical order, and returns a value accordingly. | |||
| {{tnav|ASCII code}} | Returns the ASCII value of a single character. | |||
| {{tnav|a or an}} | Takes a noun and produces the appropriate indefinite article, based on whether the first letter is a vowel. | |||
| | | |||
| [[Module:String]] | | |||
| [[mw:Help:Magic words|...Magic words]] | |||
| {{noitalic|About <code><nowiki>{{padleft:|}}</nowiki></code>.}} | |||
| [[mw:Help:Extension:ParserFunctions|...ParserFunctions]] | |||
| {{noitalic|About <code><nowiki>{{#titleparts:|}}, {{#expr:|}}, {{#ifeq:|}}, </nowiki></code> etc. | |||
}} }} | |||
<!---- | |||
| group12 = Feature requests | |||
| list12 = | |||
* [[bugzilla:6455]] – Set $wgPFEnableStringFunctions = true on WMF wikis | |||
* [[bugzilla:26092]] – Enable or install string parsing wikimarkup functionality on WMF wikis | |||
<!----Not in a navbox: | |||
| group13 = [[Wikipedia:Template sandbox and test cases|Sandboxes, testcases]] | |||
| list13 = | |||
* {{tnav|Str find/sandbox}} | |||
* {{tnav|Str index/getchar/sandbox}} | |||
* {{tnav|Str index/getchar/testcases}} | |||
* {{tnav|Str index/sandbox}} | |||
* {{tnav|Str index/testcases}} | |||
* {{tnav|Str index any/sandbox}} | |||
* {{tnav|Str index any/testcases}} | |||
* {{tnav|Str left/sandbox}} | |||
* {{tnav|Str len/core/sandbox}} | |||
* {{tnav|Str len/sandbox}} | |||
* {{tnav|Str len/testcases}} | |||
* {{tnav|Str rightc/testcases}} | |||
* {{tnav|Str ≠ len/sandbox}} | |||
* {{tnav|Str ≠ len/testcases}} | |||
-----> | |||
| belowclass = hlist | |||
| below = | |||
[[Категория:Шаблоны:Работа со строками]]{{Nobr*|[[m:Category:String templates]]}} | |||
{{Nobr*|[[:commons:Category:String manipulation templates]]}} | |||
| tracking = no | |||
}}<noinclude>[[Категория:Шаблоны:Для документирования шаблонов]] | |||
</noinclude> |