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

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


string.endswith

The string.endswith function returns true if the given string ends with the provided sequence.

#!lua
string.endswith("haystack", "needle")

Parameters

haystack is the string to check. needle is the ending sequence to check against.

Return Value

True if haystack ends with needle.

Clone this wiki locally