Module:string/documentation

From Wiktionary, the free dictionary
Jump to navigation Jump to search
Documentation for Module:string. [edit]
This page contains usage information, categories, interwiki links and other content describing the module.

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 parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace.

A very few templates are provided to enable the functions to be freely used in entries in main space:

Function Template
replace {{replace}}

Global options

ignore_errors
If set to true or 1, any error condition will result in an empty string being returned rather than an error message.
error_category
If an error occurs, specifies the name of a category to include with the error message. The default category is Errors reported by Module String.
no_category
If set to true or 1, no category will be added if an error is generated.

See also

[edit]