Changes
m
→See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other
{{Documentation subpage}}
{{Lua|Module:String}}
<!----PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE---->
== Usage ==
<code><nowiki>{{str sub old|</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 old|20090624130510|8|2}}</nowiki> returns the 2 characters starting at the 9th, i.e. "{{str sub old|20090624130510|8|2}}".
==Examples==
* <nowiki>{{str sub old|1234567|3|2}}</nowiki> {{nowrap|—> {{str sub old|1234567|3|2}} }}
* <nowiki>{{str sub old| alphabet|0|5}}</nowiki> {{nowrap|—> {{str sub old| alphabet|0|5}} }}
* <nowiki>{{str sub old| alphabet|5|999}}</nowiki> {{nowrap|—> {{str sub old |alphabet|5|999}} }}
* <nowiki>{{str sub old|alph abet|0|5}}</nowiki> {{nowrap|—> {{str sub old|alph abet|0|5}} }}
* <nowiki>{{str sub old| three words here |4|10}}</nowiki> {{nowrap|—> {{str sub old| three words here |4|10}} }}
Any leading spaces are skipped, but internal spaces are counted exactly, yet compressed when displayed.
== Template data ==
{{TemplateData header}}
<templatedata>
{
"description": "The template takes a substring of ''text'' starting at ''start'' and containing ''length'' characters.",
"params": {
"1": {
"label": "Text",
"description": "The substring to be trimmed.",
"type": "string",
"required": true
},
"2": {
"label": "Numeric position",
"description": "Numeric position of the starting character within the string",
"type": "number",
"required": true
},
"3": {
"label": "Count",
"description": "Number of characters for the substring",
"type": "number",
"required": true
}
}
}
</templatedata>
== See also ==
{{String-handling templates |trim}}
<includeonly>{{Sandbox other||
<!----CATEGORIES BELOW THIS LINE, PLEASE:---->
[[Category:String manipulation templates]]
[[lt:Šablonas:Str sub]]
}}</includeonly>
{{Lua|Module:String}}
<!----PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE---->
== Usage ==
<code><nowiki>{{str sub old|</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 old|20090624130510|8|2}}</nowiki> returns the 2 characters starting at the 9th, i.e. "{{str sub old|20090624130510|8|2}}".
==Examples==
* <nowiki>{{str sub old|1234567|3|2}}</nowiki> {{nowrap|—> {{str sub old|1234567|3|2}} }}
* <nowiki>{{str sub old| alphabet|0|5}}</nowiki> {{nowrap|—> {{str sub old| alphabet|0|5}} }}
* <nowiki>{{str sub old| alphabet|5|999}}</nowiki> {{nowrap|—> {{str sub old |alphabet|5|999}} }}
* <nowiki>{{str sub old|alph abet|0|5}}</nowiki> {{nowrap|—> {{str sub old|alph abet|0|5}} }}
* <nowiki>{{str sub old| three words here |4|10}}</nowiki> {{nowrap|—> {{str sub old| three words here |4|10}} }}
Any leading spaces are skipped, but internal spaces are counted exactly, yet compressed when displayed.
== Template data ==
{{TemplateData header}}
<templatedata>
{
"description": "The template takes a substring of ''text'' starting at ''start'' and containing ''length'' characters.",
"params": {
"1": {
"label": "Text",
"description": "The substring to be trimmed.",
"type": "string",
"required": true
},
"2": {
"label": "Numeric position",
"description": "Numeric position of the starting character within the string",
"type": "number",
"required": true
},
"3": {
"label": "Count",
"description": "Number of characters for the substring",
"type": "number",
"required": true
}
}
}
</templatedata>
== See also ==
{{String-handling templates |trim}}
<includeonly>{{Sandbox other||
<!----CATEGORIES BELOW THIS LINE, PLEASE:---->
[[Category:String manipulation templates]]
[[lt:Šablonas:Str sub]]
}}</includeonly>