Search results
Results From The WOW.Com Content Network
The Template:Str_number/trim extracts a number at the start of parameter 1. It takes a string as parameter, and returns the string trimmed to the beginning number if non-numeric text does not appear before the first number.
Returns string with the first n occurrences of target replaced with replacement. Omitting count will replace all occurrences. Space counts as a character if placed in any of the first three parameters.
Removes all characters from string that are not a digit 0–9. Examples {{digits ... {str number/trim}}, remove the first non-digit character and everything following ...
There are a number of legacy templates offering this but for new code use {{#invoke:String|sub|string|startIndex|endIndex}}. The indices are one-based (meaning the first is number one), inclusive (meaning the indices you specify are included), and may be negative to count from the other end.
The template takes a substring of ''text'' starting at ''start'' and containing ''length'' characters. Template parameters [Edit template data] Parameter Description Type Status Text 1 The substring to be trimmed. String required Numeric position 2 Numeric position of the starting character within the string Number required Count 3 Number of characters for the substring Number required See also
This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the
the replacement string: param 3 replaces param 2's first occurrence in param 1. Details The value of the text parameter may be anything that resolves to a string, such as:
Main page; Contents; Current events; Random article; About Wikipedia; Contact us; Help; Learn to edit; Community portal; Recent changes; Upload file