Difference between revisions 3951195 and 6186690 on simplewiki

{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
The '''Template:str_index_any''' extracts a specified nth character from a string, even allowing for accented letters or [[diacritics]] to be included in the string. The string can be any length, but position ''n'' (parameter 2) is limited to 500 at most.

=== Usage ===
(contracted; show full)
* <nowiki>{{</nowiki> Str len |X{{ Str index |a b|2<nowiki>}}X}}</nowiki> → {{ Str len |X{{ Str index |a b|2}}X}}
* <nowiki>X{{</nowiki> {{BASEPAGENAME}} |a b|2<nowiki>}}X</nowiki> → X{{ {{BASEPAGENAME}} |a b|2}}X

The same string-length problem occurs when using template {{tl| Str index }}. There might be other quirks as well, but most cases work as expected.

<includeonly>
<!-- CATEGORIES 
AND INTERWIKIS HERE, THANKS -->
[[Category:String manipulation templates]]

[[bn:টেমপ্লেট:Str index any]] 
[[de:Vorlage:Str index]]
[[en:Template:Str index any]]
[[es:Plantilla:Str index]]
[[ja:Template:Str index any]]
[[ka:თარგი:Str index any]]
[[pt:Predefinição:Str index]]
[[ru:Шаблон:Str index]]
[[sl:Predloga:Str index any]]
[[ur:Template:Str index any]]
</includeonly>