User:DonQuich

From Civilization Modding Wiki
Revision as of 14:05, 9 August 2012 by DonQuich (talk | contribs) (testing my bot)
Jump to navigationJump to search

This page is a part of the Lua and UI Reference.

Test if a string starts with a specified prefix (UTF-8 friendly)


Syntax

bool Locale.StartsWith(string base_string, string prefix)


Return Value

Returns true if base_string starts with prefix, false otherwise.

Parameters

base_string
The string to test against.
prefix
The prefix to test with.


Examples

local test = Locale.StartsWith("Civilization", "Civ");
print(test); -- prints true