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.
rel=nofollow

Sjabloon:Str sub: verschil tussen versies

Uit Wikisage
Naar navigatie springen Naar zoeken springen
(http://en.wikipedia.org/w/index.php?title=Template:Str_sub&oldid=366825024)
 
({{!}})
Regel 109: Regel 109:
--></noinclude>}}</includeonly><noinclude>{{sjablooninfo|1=
--></noinclude>}}</includeonly><noinclude>{{sjablooninfo|1=
=== Usage ===
=== Usage ===
<code><nowiki>{{str_sub|</nowiki>''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>{{str_sub|20090624130510|8|2}}</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}}"


''start'' + ''length'' must be less than 50.  Only operates on a limited character set.
''start'' + ''length'' must be less than 50.  Only operates on a limited character set.

Versie van 19 mrt 2012 12:51

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 {{=}}.)

See also