The string class used in Openplanet as well as the game.
The string class used in Openplanet as well as the game.
bool StartsWith(const string&in) const
Returns true if the string starts with the given substring.
bool bool EndsWith(const string&in) const
Returns true if the string ends with the given substring.
bool bool Contains(const string&in) const
Returns true if the string contains the given substring.
bool int LastIndexOf(const string&in) const
Searches the string for the given substring and returns the index at which the last instance of it starts. When it is not found, returns -1.
int int IndexOf(const string&in) const
Searches the string for the given substring and returns the index at which it starts. When it is not found, returns -1.
int string Trim() const
Returns a string from this string with whitespace at the start and end of the string removed. Whitespace includes spaces, tabs, newlines, vertical tabs, feeds, and carriage returns.
string string ToLower() const
Returns a string from this string with all characters in lowercase.
string string ToUpper() const
Returns a string from this string with all characters in uppercase.
string string SubStr(int index) const
Returns the remainder of the string after the given index. For example; for the string "Hello", SubStr(1) returns "ello".
string string SubStr(int index, int length) const
Returns a portion of the string from the index and length. For example; for the string "Hello", SubStr(1, 3) returns "ell".
string string Replace(const string&in search, const string&in replace) const
Returns the string with all the given search substrings replaced with the given replacement string.
string string[]@ Split(const string&in str, int limit = 0) const
Splits the string on the given substring and returns an array with all the individual parts.
string[]@