Drag[en]gine Script Module DragonScript Script API  1.0
UnicodeString Class Reference

Unicode string. More...

Inheritance diagram for 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...
 
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...
 
static UnicodeString newFromCharacter (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.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ compareTo()

int 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 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 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 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 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 getCharacterAt ( int  position)

Unicode character at the given location.

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

§ getLeft()

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 getLength ( )

Count of characters in the unicode string.

§ getRight()

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 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 hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

§ new() [1/2]

UnicodeString new ( )

Create empty unicode string.

§ new() [2/2]

UnicodeString new ( UnicodeString  string)

Create copy of unicode string.

§ newFromCharacter()

static UnicodeString newFromCharacter ( int  character)
static

Create unicode string from unicode character.

§ newFromUTF8()

static UnicodeString newFromUTF8 ( String  string)
static

Create unicode string from utf8 encoded string.

§ operator+() [1/6]

UnicodeString operator+ ( UnicodeString  string)

Concatenation of two unicode strings.

§ operator+() [2/6]

UnicodeString operator+ ( byte  value)

Concatenation of unicode string and character.

§ operator+() [3/6]

UnicodeString operator+ ( bool  value)

Concatenation of unicode string and boolean value converted to string.

§ operator+() [4/6]

UnicodeString operator+ ( int  value)

Concatenation of unicode string and integer value converted to string.

§ operator+() [5/6]

UnicodeString operator+ ( float  value)

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

§ operator+() [6/6]

UnicodeString operator+ ( Object  object)

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

§ reverse()

UnicodeString reverse ( )

Unicode string with the reversed order of characters.

§ toFloat()

float toFloat ( )

Converted to floating point value if possible.

§ toInt()

int toInt ( )

Converted to integer if possible.

§ toLower()

UnicodeString toLower ( )

Unicode string with all characters converted to lower case.

§ toString()

String toString ( )

UTF8 encoded string.

§ toUpper()

UnicodeString toUpper ( )

Unicode string with all characters converted to upper case.

§ toUTF8()

String toUTF8 ( )

UTF8 encoding of the unicode string.

§ trimBoth()

UnicodeString trimBoth ( )

Unicode string with white spaces stripped from beginning and end.

§ trimLeft()

UnicodeString trimLeft ( )

Unicode string with white spaces stripped from beginning.

§ trimRight()

UnicodeString trimRight ( )

Unicode string with white spaces stripped from the end.


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