|
Drag[en]gine Script Module DragonScript 1.32.1
|
Unicode string. More...
Public Member Functions | |
Management | |
| int | getLength () |
| Count of characters in the unicode string. | |
| int | getCharacterAt (int position) |
| Unicode character at the given location. | |
| UnicodeString | getLeft (int count) |
| Unicode string with characters from beginning. | |
| UnicodeString | getRight (int count) |
| Unicode string with characters from the end. | |
| UnicodeString | getSubString (int position, int count) |
| Unicode string with characters from middle. | |
| UnicodeString | reverse () |
| Unicode string with the reversed order of characters. | |
Trim | |
| UnicodeString | trimLeft () |
| Unicode string with white spaces stripped from beginning. | |
| UnicodeString | trimRight () |
| Unicode string with white spaces stripped from the end. | |
| UnicodeString | trimBoth () |
| Unicode string with white spaces stripped from beginning and end. | |
Search | |
| int | findCharacter (int character, int position) |
| Index of first occurance of character. | |
| int | findCharacterReverse (int character, int position) |
| Index of first occurance of character from end to start. | |
Compare | |
| int | compareTo (UnicodeString string) |
| Compare cases sensitive to another unicode string. | |
| int | compareToNoCase (UnicodeString string) |
| Compare cases insensitive to another unicode string. | |
| String | toString () |
| UTF8 encoded string. | |
| bool | equals (Object other) |
| Unicode string is equal to another object. | |
| int | hashCode () |
| Hash code for use as dictionary keys. | |
| int | compare (Object obj) |
| Compare object with another object. | |
Convert | |
| UnicodeString | toLower () |
| Unicode string with all characters converted to lower case. | |
| UnicodeString | toUpper () |
| Unicode string with all characters converted to upper case. | |
| int | toInt () |
| Converted to integer if possible. | |
| float | toFloat () |
| Converted to floating point value if possible. | |
| String | toUTF8 () |
| UTF8 encoding of the unicode string. | |
Operators | |
| UnicodeString | operator+ (UnicodeString string) |
| Concatenation of two unicode strings. | |
| UnicodeString | operator+ (byte value) |
| Concatenation of unicode string and character. | |
| UnicodeString | operator+ (bool value) |
| Concatenation of unicode string and boolean value converted to string. | |
| UnicodeString | operator+ (int value) |
| Concatenation of unicode string and integer value converted to string. | |
| UnicodeString | operator+ (float value) |
| Concatenation of unicode string and floating point value converted to string. | |
| UnicodeString | operator+ (Object object) |
| Concatenation of unicode string and object value converted to string using Object.toString(). | |
Constructors | |
| UnicodeString | new () |
| Create empty unicode string. | |
| UnicodeString | new (UnicodeString string) |
| Create copy of unicode string. | |
| UnicodeString | new (int character) |
| Create unicode string from unicode character. | |
| static UnicodeString | newFromUTF8 (String string) |
| Create unicode string from utf8 encoded string. | |
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.