nanos world API Reference Unofficial documentation
Function Shared

string.StartsWith

Test whether this string starts with given string

Syntax

Lua
string.StartsWith(other_string)

Parameters

Name Type Default Description
other_string string The given string

Returns

  • boolean

Examples

Checks if string starts with text
local str = "awesome text!",local starts = str:StartsWith("awesome")