Wikisage, de vrije encyclopedie van de tweede generatie, is digitaal erfgoed
Wikisage is op 1 na de grootste internet-encyclopedie in het Nederlands. Iedereen kan de hier verzamelde kennis gratis gebruiken, zonder storende advertenties. De Koninklijke Bibliotheek van Nederland heeft Wikisage in 2018 aangemerkt als digitaal erfgoed.
- Wilt u meehelpen om Wikisage te laten groeien? Maak dan een account aan. U bent van harte welkom. Zie: Portaal:Gebruikers.
- Bent u blij met Wikisage, of wilt u juist meer? Dan stellen we een bescheiden donatie om de kosten te bestrijden zeer op prijs. Zie: Portaal:Donaties.
Sjabloon:Str sub: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
(+) |
(cat) |
||
Regel 107: | Regel 107: | ||
--></noinclude>{{{{{|safesubst:}}}#ifexpr:{{{2|0}}} >= 50 or {{{2|0}}} + {{{3|0}}} > 50|{{FormattingError |nocategory={{{nocategory|}}} |max index is 50 for str_sub}}}}<noinclude><!-- | --></noinclude>{{{{{|safesubst:}}}#ifexpr:{{{2|0}}} >= 50 or {{{2|0}}} + {{{3|0}}} > 50|{{FormattingError |nocategory={{{nocategory|}}} |max index is 50 for str_sub}}}}<noinclude><!-- | ||
--></noinclude>}}</includeonly><noinclude>{{sjablooninfo|1= | --></noinclude>}}</includeonly><noinclude>{{sjablooninfo|1= | ||
=== Usage === | === Usage === | ||
<code><nowiki>{{</nowiki>str_sub{{!}}''text''{{!}}''start''{{!}}''length''<nowiki>}}</nowiki></code> = Substring of ''text'' starting at ''start'' and containing ''length'' characters. Base 0: the first character is numbered 0, and so on, e.g. <nowiki>{{</nowiki>str_sub{{!}}20090624130510{{!}}8{{!}}2<nowiki>}}</nowiki> returns the 2 characters starting at the 9th, i.e. "{{str_sub|20090624130510|8|2}}" | <code><nowiki>{{</nowiki>str_sub{{!}}''text''{{!}}''start''{{!}}''length''<nowiki>}}</nowiki></code> = Substring of ''text'' starting at ''start'' and containing ''length'' characters. Base 0: the first character is numbered 0, and so on, e.g. <nowiki>{{</nowiki>str_sub{{!}}20090624130510{{!}}8{{!}}2<nowiki>}}</nowiki> returns the 2 characters starting at the 9th, i.e. "{{str_sub|20090624130510|8|2}}" | ||
Regel 115: | Regel 115: | ||
{{Str character set/doc}} | {{Str character set/doc}} | ||
}}</noinclude> | }} | ||
[[Categorie:Nog te vertalen sjablonen]]</noinclude> |
Versie van 15 jul 2012 14:43
De sjabloonbeschrijving hieronder wordt niet afgebeeld wanneer de sjabloon wordt geplaatst.
Usage
{{str_sub|text|start|length}}
= Substring of text starting at start and containing length characters. Base 0: the first character is numbered 0, and so on, e.g. {{str_sub|20090624130510|8|2}} returns the 2 characters starting at the 9th, i.e. "13"
start + length must be less than 50. Only operates on a limited character set.
- The character set is A-Z, a-z, 0-9, space and !@#$%^&*().,<>:;[]'"?/\{}~`=-|+_♣♦♥♠. (Obviously | and = will have to have been input as {{!}} and {{=}}.)