Sjabloon:Str sub oud
Voorkoms
Sjabloondokumentasie[sien] [wysig] [geskiedenis] [wis kasgeheue]
Gebruik Lua: |
Usage
[wysig bron]{{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. "Sjabloon:Str sub".
Examples
[wysig bron]- {{str_sub|1234567|3|2}} —> Sjabloon:Str sub
- {{str_sub| alphabet|0|5}} —> Sjabloon:Str sub
- {{str_sub| alphabet|5|999}} —> Sjabloon:Str sub
- {{str_sub|alph abet|0|5}} —> Sjabloon:Str sub
- {{str_sub| three words here |4|10}} —> Sjabloon:Str sub
Any leading spaces are skipped, but internal spaces are counted exactly, yet compressed when displayed.
Template data
[wysig bron]The template takes a substring of ''text'' starting at ''start'' and containing ''length'' characters.
Parameter | Beskrywing | Soort | Status | |
---|---|---|---|---|
Text | 1 | The substring to be trimmed. | String | verpligtend |
Numeric position | 2 | Numeric position of the starting character within the string | Nommer | verpligtend |
Count | 3 | Number of characters for the substring | Nommer | verpligtend |
See also
[wysig bron]Sjabloon:String-handling templates
Die bostaande dokumentasie is ingesluit vanaf Sjabloon:Str sub oud/doc. (wysig | geskiedenis) Redigeerders kan eksperimenteer in hierdie sjabloon se sandput (skep | spieël) en toetsgevalle (skep) blaaie. Plaas asseblief kategorieë op die /doc-subbladsy. Subbladsye vir die sjabloon. |