Template:Str sub new/doc

Usage
This template selects a sub-string from the target string based on selected indices. The indices are 1-based. If the end index is omitted, it returns the rest of the string. One can also specify negative indices, in which case the substr is selected by counting from the end of the string.

Unnamed parameters








Named parameters


Equivalent to:



Named parameters are required if the target string contains an equals sign, where unnamed or numbered parameters will not work as expected: