Last modified 9 years ago Last modified on 2010-02-27 03:46:36

stringutils.lua

This module adds some extra functions to the standard Lua string library. These can also be used as 'string methods', both valid syntaxes are shown here.

string.split (s, delimiter)
s:split (delimiter)

Returns an array of substrings, separated by the pattern delimiter.

string.template (s, variables)
s:template (variables)

Returns a formatted string, replacing any %{key}% by the value of variables.key.