Template:Str split

From Wikidata
Jump to navigation Jump to search
Documentation icon Template documentation[view · edit · history · purge ]

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, return null.