User:DonQuich: Difference between revisions
From Civilization Modding Wiki
Jump to navigationJump to search
m (testing my bot) |
m (testing my bot) |
||
Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
< | <code>'''bool''' Locale.StartsWith('''string''' base_string, '''string''' prefix)</code> | ||
'''Return Value''' | '''Return Value''' | ||
:Returns true if base_string starts with prefix, false otherwise. | :Returns true if base_string starts with prefix, false otherwise. |
Revision as of 13:58, 9 August 2012
This page is a part of the Lua and UI Reference.
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