Template:Sub
- Afrikaans
- አማርኛ
- العربية
- অসমীয়া
- Atikamekw
- Azərbaycanca
- Basa Bali
- Беларуская
- Български
- भोजपुरी
- বাংলা
- Brezhoneg
- Нохчийн
- کوردی
- Čeština
- Чӑвашла
- Cymraeg
- Dansk
- English
- Esperanto
- فارسی
- Suomi
- Na Vosa Vakaviti
- Français
- Arpetan
- Galego
- Bahasa Hulontalo
- 客家語 / Hak-kâ-ngî
- עברית
- हिन्दी
- Hrvatski
- Հայերեն
- Interlingua
- Bahasa Indonesia
- Ilokano
- ГӀалгӀай
- Íslenska
- 日本語
- Jawa
- ភាសាខ្មែរ
- 한국어
- Kurdî
- Latina
- Latviešu
- Basa Banyumasan
- Македонски
- മലയാളം
- ဘာသာမန်
- မြန်မာဘာသာ
- مازِرونی
- नेपाली
- नेपाल भाषा
- Norsk nynorsk
- Norsk
- ଓଡ଼ିଆ
- Ирон
- Português
- Română
- Русский
- संस्कृतम्
- Саха тыла
- Scots
- ၽႃႇသႃႇတႆး
- සිංහල
- Simple English
- Slovenščina
- Српски / srpski
- Sunda
- தமிழ்
- ไทย
- Türkçe
- Татарча / tatarça
- Українська
- Tiếng Việt
- 中文
- 粵語
Appearance
From Meta, a Wikimedia project coordination wiki
Extracts a substring of a string.
Usage
[edit ]{{sub|text|number of characters removed from the start|maximum length}}
"{{sub|20090624130510|0|0}}"
gives""
."{{sub|20090624130510|0|3}}"
gives"200"
."{{sub|20090624130510|8|0}}"
gives""
."{{sub|20090624130510|8|3}}"
gives"130"
."{{sub|café noir|0|4}}"
gives"café"
."{{sub|café noir|1|3}}"
gives"afé"
."{{sub|café noir|3|2}}"
gives"é "
."{{sub|café noir|4|2}}"
gives" n"
."{{sub|22:06, 12 July 2010 User|19|5}}"
gives" User"
."{{sub|22:06, 2 July 2010 User|19|4}}"
gives"User"
."{{sub|123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123|0|200}}"
gives"123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123"
."{{sub|123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123|1|200}}"
gives"23456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123"
."{{sub|1*3456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123|1|200}}"
gives"
3456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123"
.
Limitation
[edit ]<nowiki>...</nowiki>
and <nowiki />
tags and their content are internally replaced by a code, which may affect the result:
"{{sub|<nowiki/>*café noir|1|9}}"
gives"'"`UNIQ--"
."{{sub|*café noir|1|9}}"
gives"café noir"
.
Automatic newline
[edit ]Due to the automatic newline feature/bug a newline is added before any "*", "#", ":", and ";" in the substring, except when the substring starts at the start of the string:
"{{sub|*test|1|4}}"
gives"test"
.
See also
[edit ]The above documentation is transcluded from Template:Sub/doc. (edit | history)
Editors can experiment in this template’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this template.
Editors can experiment in this template’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this template.