Drag[en]gine Script Module DragonScript
1.23
|
Unicode string. More...
Public Member Functions | |
Management | |
int | getLength () |
Count of characters in the unicode string. More... | |
int | getCharacterAt (int position) |
Unicode character at the given location. More... | |
UnicodeString | getLeft (int count) |
Unicode string with characters from beginning. More... | |
UnicodeString | getRight (int count) |
Unicode string with characters from the end. More... | |
UnicodeString | getSubString (int position, int count) |
Unicode string with characters from middle. More... | |
UnicodeString | reverse () |
Unicode string with the reversed order of characters. More... | |
Trim | |
UnicodeString | trimLeft () |
Unicode string with white spaces stripped from beginning. More... | |
UnicodeString | trimRight () |
Unicode string with white spaces stripped from the end. More... | |
UnicodeString | trimBoth () |
Unicode string with white spaces stripped from beginning and end. More... | |
Search | |
int | findCharacter (int character, int position) |
Index of first occurance of character. More... | |
int | findCharacterReverse (int character, int position) |
Index of first occurance of character from end to start. More... | |
Compare | |
int | compareTo (UnicodeString string) |
Compare cases sensitive to another unicode string. More... | |
int | compareToNoCase (UnicodeString string) |
Compare cases insensitive to another unicode string. More... | |
String | toString () |
UTF8 encoded string. More... | |
bool | equals (Object other) |
Unicode string is equal to another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
int | compare (Object obj) |
Compare object with another object. More... | |
Convert | |
UnicodeString | toLower () |
Unicode string with all characters converted to lower case. More... | |
UnicodeString | toUpper () |
Unicode string with all characters converted to upper case. More... | |
int | toInt () |
Converted to integer if possible. More... | |
float | toFloat () |
Converted to floating point value if possible. More... | |
String | toUTF8 () |
UTF8 encoding of the unicode string. More... | |
Operators | |
UnicodeString | operator+ (UnicodeString string) |
Concatenation of two unicode strings. More... | |
UnicodeString | operator+ (byte value) |
Concatenation of unicode string and character. More... | |
UnicodeString | operator+ (bool value) |
Concatenation of unicode string and boolean value converted to string. More... | |
UnicodeString | operator+ (int value) |
Concatenation of unicode string and integer value converted to string. More... | |
UnicodeString | operator+ (float value) |
Concatenation of unicode string and floating point value converted to string. More... | |
UnicodeString | operator+ (Object object) |
Concatenation of unicode string and object value converted to string using Object.toString(). More... | |
Constructors | |
UnicodeString | new () |
Create empty unicode string. More... | |
UnicodeString | new (UnicodeString string) |
Create copy of unicode string. More... | |
UnicodeString | new (int character) |
Create unicode string from unicode character. More... | |
static UnicodeString | newFromUTF8 (String string) |
Create unicode string from utf8 encoded string. More... | |
Unicode string.
This is a native class.
int Dragengine.UnicodeString.compare | ( | Object | obj | ) |
Compare object with another object.
Used to sort objects. Overwrite to implement sorting.
0 | Object is equal to obj. |
<0 | Object comes before obj. |
>0 | Object comes after obj. |
int Dragengine.UnicodeString.compareTo | ( | UnicodeString | string | ) |
Compare cases sensitive to another unicode string.
0 | Strings are equal. |
<0 | First differing character has smaller lexicographical value. |
>0 | First differing character has larger lexicographical value. |
int Dragengine.UnicodeString.compareToNoCase | ( | UnicodeString | string | ) |
Compare cases insensitive to another unicode string.
0 | Strings are equal. |
<0 | First differing character has smaller lexicographical value. |
>0 | First differing character has larger lexicographical value. |
bool Dragengine.UnicodeString.equals | ( | Object | other | ) |
Unicode string is equal to another object.
Implements Object.equals(Object).
int Dragengine.UnicodeString.findCharacter | ( | int | character, |
int | position | ||
) |
Index of first occurance of character.
EOutOfBoundary | position is less than 0 or greater than or equal to getLength(). |
int Dragengine.UnicodeString.findCharacterReverse | ( | int | character, |
int | position | ||
) |
Index of first occurance of character from end to start.
EOutOfBoundary | position is less than 0 or greater than or equal to getLength(). |
int Dragengine.UnicodeString.getCharacterAt | ( | int | position | ) |
Unicode character at the given location.
EOutOfBoundary | position is less than 0 or greater than or equal to getLength(). |
UnicodeString Dragengine.UnicodeString.getLeft | ( | int | count | ) |
Unicode string with characters from beginning.
EOutOfBoundary | count is less than 0 or greater than or equal to getLength(). |
int Dragengine.UnicodeString.getLength | ( | ) |
Count of characters in the unicode string.
UnicodeString Dragengine.UnicodeString.getRight | ( | int | count | ) |
Unicode string with characters from the end.
EOutOfBoundary | count is less than 0 or greater than or equal to getLength(). |
UnicodeString Dragengine.UnicodeString.getSubString | ( | int | position, |
int | count | ||
) |
Unicode string with characters from middle.
EOutOfBoundary | position is less than 0 or greater than or equal to getLength(). |
EOutOfBoundary | count is less than 0 or greater than or equal to getLength(). |
int Dragengine.UnicodeString.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
UnicodeString Dragengine.UnicodeString.new | ( | ) |
Create empty unicode string.
UnicodeString Dragengine.UnicodeString.new | ( | int | character | ) |
Create unicode string from unicode character.
UnicodeString Dragengine.UnicodeString.new | ( | UnicodeString | string | ) |
Create copy of unicode string.
|
static |
Create unicode string from utf8 encoded string.
UnicodeString Dragengine.UnicodeString.operator+ | ( | bool | value | ) |
Concatenation of unicode string and boolean value converted to string.
UnicodeString Dragengine.UnicodeString.operator+ | ( | byte | value | ) |
Concatenation of unicode string and character.
UnicodeString Dragengine.UnicodeString.operator+ | ( | float | value | ) |
Concatenation of unicode string and floating point value converted to string.
UnicodeString Dragengine.UnicodeString.operator+ | ( | int | value | ) |
Concatenation of unicode string and integer value converted to string.
UnicodeString Dragengine.UnicodeString.operator+ | ( | Object | object | ) |
Concatenation of unicode string and object value converted to string using Object.toString().
UnicodeString Dragengine.UnicodeString.operator+ | ( | UnicodeString | string | ) |
Concatenation of two unicode strings.
UnicodeString Dragengine.UnicodeString.reverse | ( | ) |
Unicode string with the reversed order of characters.
float Dragengine.UnicodeString.toFloat | ( | ) |
Converted to floating point value if possible.
int Dragengine.UnicodeString.toInt | ( | ) |
Converted to integer if possible.
UnicodeString Dragengine.UnicodeString.toLower | ( | ) |
Unicode string with all characters converted to lower case.
String Dragengine.UnicodeString.toString | ( | ) |
UTF8 encoded string.
UnicodeString Dragengine.UnicodeString.toUpper | ( | ) |
Unicode string with all characters converted to upper case.
String Dragengine.UnicodeString.toUTF8 | ( | ) |
UTF8 encoding of the unicode string.
UnicodeString Dragengine.UnicodeString.trimBoth | ( | ) |
Unicode string with white spaces stripped from beginning and end.
UnicodeString Dragengine.UnicodeString.trimLeft | ( | ) |
Unicode string with white spaces stripped from beginning.
UnicodeString Dragengine.UnicodeString.trimRight | ( | ) |
Unicode string with white spaces stripped from the end.