Skip to content
mba105 edited this page Sep 24, 2014 · 2 revisions

Home > [Scripting Reference](Scripting Reference) > string.findlast


string.findlast

The string.findlast function finds the last instance of a pattern within a string.

#!lua
string.endswith("str", "pattern", plain)

Parameters

str is the string to be searched. pattern is the pattern to search for; it may use Lua's pattern matching syntax. If plain is true, no pattern matching will be performed (faster).

Return Value

The matching pattern, if found, or nil if there were no matches.

Clone this wiki locally