luaguides

Reference

String Methods

Methods for string manipulation.

  1. string.find

    Search for a pattern in a Lua string and return the start and end positions. Supports Lua patterns or plain literal search via the optional plain argument.

  2. string.gsub

    Replace pattern matches in a Lua string. Accepts a literal replacement, a table lookup, or a function that returns the replacement for each match.