Sjabloon:Str sub oud/doc
Hierdie is 'n {{dokumentasie}}-bladsy vir Sjabloon:Str sub oud. Dit bevat gebruiksinligting, kategorieë en ander inhoud wat nie deel is van die oorspronklike sjabloonbladsy nie. |
Gebruik Lua: |
Usage
wysig{{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- {{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
wysigThe 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
wysigSjabloon:String-handling templates