Drag[en]gine Script Module DragonScript  1.23
Dragengine.UnicodeString Class Reference

Unicode string. More...

Inheritance diagram for Dragengine.UnicodeString:

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...
 

Detailed Description

Unicode string.

This is a native class.

Member Function Documentation

◆ compare()

int Dragengine.UnicodeString.compare ( Object  obj)

Compare object with another object.

Used to sort objects. Overwrite to implement sorting.

Return values
0Object is equal to obj.
<0Object comes before obj.
>0Object comes after obj.

◆ compareTo()

int Dragengine.UnicodeString.compareTo ( UnicodeString  string)

Compare cases sensitive to another unicode string.

Return values
0Strings are equal.
<0First differing character has smaller lexicographical value.
>0First differing character has larger lexicographical value.

◆ compareToNoCase()

int Dragengine.UnicodeString.compareToNoCase ( UnicodeString  string)

Compare cases insensitive to another unicode string.

Return values
0Strings are equal.
<0First differing character has smaller lexicographical value.
>0First differing character has larger lexicographical value.

◆ equals()

bool Dragengine.UnicodeString.equals ( Object  other)

Unicode string is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type UnicodeString and both are equal.

◆ findCharacter()

int Dragengine.UnicodeString.findCharacter ( int  character,
int  position 
)

Index of first occurance of character.

Exceptions
EOutOfBoundaryposition is less than 0 or greater than or equal to getLength().

◆ findCharacterReverse()

int Dragengine.UnicodeString.findCharacterReverse ( int  character,
int  position 
)

Index of first occurance of character from end to start.

Exceptions
EOutOfBoundaryposition is less than 0 or greater than or equal to getLength().

◆ getCharacterAt()

int Dragengine.UnicodeString.getCharacterAt ( int  position)

Unicode character at the given location.

Exceptions
EOutOfBoundaryposition is less than 0 or greater than or equal to getLength().

◆ getLeft()

UnicodeString Dragengine.UnicodeString.getLeft ( int  count)

Unicode string with characters from beginning.

Exceptions
EOutOfBoundarycount is less than 0 or greater than or equal to getLength().

◆ getLength()

int Dragengine.UnicodeString.getLength ( )

Count of characters in the unicode string.

◆ getRight()

UnicodeString Dragengine.UnicodeString.getRight ( int  count)

Unicode string with characters from the end.

Exceptions
EOutOfBoundarycount is less than 0 or greater than or equal to getLength().

◆ getSubString()

UnicodeString Dragengine.UnicodeString.getSubString ( int  position,
int  count 
)

Unicode string with characters from middle.

Exceptions
EOutOfBoundaryposition is less than 0 or greater than or equal to getLength().
EOutOfBoundarycount is less than 0 or greater than or equal to getLength().

◆ hashCode()

int Dragengine.UnicodeString.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

◆ new() [1/3]

UnicodeString Dragengine.UnicodeString.new ( )

Create empty unicode string.

◆ new() [2/3]

UnicodeString Dragengine.UnicodeString.new ( int  character)

Create unicode string from unicode character.

◆ new() [3/3]

UnicodeString Dragengine.UnicodeString.new ( UnicodeString  string)

Create copy of unicode string.

◆ newFromUTF8()

static UnicodeString Dragengine.UnicodeString.newFromUTF8 ( String  string)
static

Create unicode string from utf8 encoded string.

◆ operator+() [1/6]

UnicodeString Dragengine.UnicodeString.operator+ ( bool  value)

Concatenation of unicode string and boolean value converted to string.

◆ operator+() [2/6]

UnicodeString Dragengine.UnicodeString.operator+ ( byte  value)

Concatenation of unicode string and character.

◆ operator+() [3/6]

UnicodeString Dragengine.UnicodeString.operator+ ( float  value)

Concatenation of unicode string and floating point value converted to string.

◆ operator+() [4/6]

UnicodeString Dragengine.UnicodeString.operator+ ( int  value)

Concatenation of unicode string and integer value converted to string.

◆ operator+() [5/6]

UnicodeString Dragengine.UnicodeString.operator+ ( Object  object)

Concatenation of unicode string and object value converted to string using Object.toString().

◆ operator+() [6/6]

UnicodeString Dragengine.UnicodeString.operator+ ( UnicodeString  string)

Concatenation of two unicode strings.

◆ reverse()

UnicodeString Dragengine.UnicodeString.reverse ( )

Unicode string with the reversed order of characters.

◆ toFloat()

float Dragengine.UnicodeString.toFloat ( )

Converted to floating point value if possible.

◆ toInt()

int Dragengine.UnicodeString.toInt ( )

Converted to integer if possible.

◆ toLower()

UnicodeString Dragengine.UnicodeString.toLower ( )

Unicode string with all characters converted to lower case.

◆ toString()

String Dragengine.UnicodeString.toString ( )

UTF8 encoded string.

◆ toUpper()

UnicodeString Dragengine.UnicodeString.toUpper ( )

Unicode string with all characters converted to upper case.

◆ toUTF8()

String Dragengine.UnicodeString.toUTF8 ( )

UTF8 encoding of the unicode string.

◆ trimBoth()

UnicodeString Dragengine.UnicodeString.trimBoth ( )

Unicode string with white spaces stripped from beginning and end.

◆ trimLeft()

UnicodeString Dragengine.UnicodeString.trimLeft ( )

Unicode string with white spaces stripped from beginning.

◆ trimRight()

UnicodeString Dragengine.UnicodeString.trimRight ( )

Unicode string with white spaces stripped from the end.


The documentation for this class was generated from the following file: