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

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


string.startswith

The string.startswith function returns true if the given string starts with the provided sequence.

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

Parameters

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

Return Value

True if haystack starts with needle.

Clone this wiki locally