Help:StringFunctions

The StringFunctions extension adds a set of parser functions that allows more editing capabilities to strings. The syntax of parser functions are:. All of these functions are safe with UTF-8 multibyte characters.

#len
The #len (length) function accepts a string and outputs the length of the string. Leading spaces are not counted, but intermediate spaces and newlines are counted. Entities are counted according to their source form, however. Some wiki tags, such as nowiki, are not counted.

#pos
The #pos function finds a term in a given string, and returns its position. If the search term is immediately found in a string, it returns "0". An optional parameter, offset, tells the function in what location of the string it should begin searching at. If the search term does not exist in the given string, it returns nothing. The syntax for this function is.