Template:Str split
Jump to navigation
Jump to search
Description
[edit]Chop a string of text according to a separator, and return the nth chunk, as requested.
It works based on the module: StringFunc and is intended to simplify the code that must be written to invoke it.
Syntax
[edit]{{Str_split | string | separator | index }}
Works only with positional parameters.
Parameters:
- Parameter 1
string
: The text string to be treated - Parameter 2
separator
: The separator by which to cut the string - Parameter 3
index
: The index of the piece to return. If you are prompted for a piece that does not exist, returnnull
.
The above documentation is transcluded from Template:Str split/doc (edit | history). Editors can experiment in this template's sandbox (create | mirror) and testcases (create) page. Please add categories to the /doc subpage. Subpages of this template. |