Module:Ustring/doc

This module directly imports all functions from the library. Documentation for each function can be found there.

The module takes an indefinite number of arguments. All arguments are coerced as number type if possible. If you wish for something to remain a string, you can simply escape it by insert  at the beginning of the string.

You can also wrap results in tags. All non-number indexed arguments will be passed to

Usage
is equivalent to

Example using mw.ustring.sub
produces:

Example using mw.ustring.gsub
produces:

Example using mw.ustring.char
produces:

&amp;#

This is nice for escaping character sequences in other modules; for example:

Example using mw.ustring.match
produces:

Note: Only the first match is returned. Additional returns are omitted because mw.ustring.gsub's second return value is generally undesirable.

Example using tag arguments
produces:

Note that:

produces:

Errors
Errors from accessing should be maintained, e.g.:

should produce:

and

should produce: