Template:Str right
- English
- español
- 日本語
- Deutsch
- français
- 中文
- русский
- italiano
- português
- Nederlands
- العربية
- Acèh
- Alemannisch
- الدارجة
- مصرى
- অসমীয়া
- asturianu
- azərbaycanca
- تۆرکجه
- башҡортса
- Basa Bali
- Boarisch
- беларуская
- беларуская (тарашкевіца)
- български
- বাংলা
- bosanski
- буряад
- català
- нохчийн
- کوردی
- corsu
- qırımtatarca
- čeština
- чӑвашла
- Cymraeg
- dansk
- Kadazandusun
- Ελληνικά
- Esperanto
- eesti
- euskara
- فارسی
- suomi
- føroyskt
- Gagauz
- Gàidhlig
- galego
- ગુજરાતી
- 客家語 / Hak-kâ-ngî
- עברית
- हिन्दी
- hornjoserbsce
- magyar
- հայերեն
- Արեւմտահայերէն
- Jaku Iban
- Bahasa Indonesia
- Ilokano
- гӀалгӀай
- Jawa
- ქართული
- Taqbaylit
- қазақша
- ភាសាខ្មែរ
- ಕನ್ನಡ
- 한국어
- kurdî
- кыргызча
- Latina
- ລາວ
- lietuvių
- latviešu
- मैथिली
- мокшень
- олык марий
- Minangkabau
- മലയാളം
- монгол
- मराठी
- Bahasa Melayu
- မြန်မာဘာသာ
- مازِرونی
- नेपाली
- Li Niha
- ଓଡ଼ିଆ
- ирон
- ਪੰਜਾਬੀ
- Papiamentu
- Pälzisch
- پنجابی
- پښتو
- ikirundi
- română
- русиньскый
- संस्कृतम्
- саха тыла
- Scots
- سنڌي
- တႆး
- සිංහල
- Simple English
- slovenčina
- سرائیکی
- slovenščina
- српски / srpski
- svenska
- Sakizaya
- తెలుగు
- тоҷикӣ
- ไทย
- ትግርኛ
- Türkmençe
- Tagalog
- Türkçe
- татарча / tatarça
- українська
- اردو
- oʻzbekcha / ўзбекча
- vèneto
- Tiếng Việt
- 吴语
- მარგალური
- ייִדיש
- ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ
- 文言
- 粵語
This documentation is transcluded from Template:Str right/doc.
Note: if you want to edit this template, first try your modifications on {{Str right/sandbox}}.You can then test your edits in {{Str right/testcases}}.
When the new version is ready, you can move it to the main template.
| Uses Lua: |
Usage
{{Str right|<string>|<offset>}}
Gives the characters from <offset> to the end of the string.
A negative <offset> is treated the same as zero, which simply returns the original string.
If <offset> is longer than <string> then this returns an empty string.
If <offset> is invalid, empty or undefined, this template goes berserk, so don't do that.
Limitations
- Up to 100 chararacters in the input string. If possible, first check length of input string using {{<string>}}. Using strings longer than 100 characters may result in the error "max index is 100 for str_sub".
- Limited set of characters.
- Expensive.
Examples
{{Str right| lorem ipsum dolor sit amet | 10 }}→ m dolor sit amet{{Str right| lorem ipsum dolor sit amet | 1 }}→ orem ipsum dolor sit amet{{Str right| lorem ipsum dolor sit amet | 0 }}→ lorem ipsum dolor sit amet{{Str right |123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.1 | 99}}→ 3456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.1
See also
String-handling templates (help page) | |||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
Trimming templates:
- {{Trunc}} – To trim down to a specified number of characters.
- {{Trim}} — To trim any leading or trailing whitespace.
- {{Str left}} – To trim down to a specified number of characters, or duplicate the string to a specified number.
- {{Str right}}
- {{Strip}} – To strip (remove) a given number of characters from the beginning/end of the string
Analyzing templates:
- {{Str endswith}} – To check if a string ends with a given string.
- {{Str find}} – Returns the numerical location of a given string in a string, up to 50 characters.
- {{Str len}} – Returns a string's length. Can count up to 500 characters.
String length comparison templates:
- {{Str ≤ len}} – To check if a string is "shorter or equally long" or "longer" than a given length.
Technical stuff:
- mw:Help:Magic words – About
{{padleft:|}}. - mw:Help:Extension:ParserFunctions – About
{{#titleparts:|}}, {{#expr:|}}, {{#ifeq:|}},etc. - Module:String - Script with native string parsing Category:String manipulation templates