Top index Wirbel home

::trimTo

string.trimTo(stopper) - remove prefix from string up to first occurance of stopper

string.trimTo(stopper) scans astring from the left for stopper, which can be a string or a single character. If found, it removes everything from the beginning upto and including the leftmost occurance of stopper and returns the rest. If stopper is not found, astring itself returned. astring is not modified.

Examples

 "hello merry world".trimTo(' ') == "merry world"
 "one::two::three".trimTo("::") == "two::three"

See also

trimFrom, trimFromFirst, trimToLast