|
|
This class implements the String datatype.
|
Constructor for an empty string.
|
Constructor for a copy of a string.
Parameters:
string | String to be copied. |
|
Constructor for a copy of a string.
Parameters:
string | String to be copied. |
|
Constructor for a copy of a string with a given length to be copied.
Parameters:
string | String to be copied. |
length | Number of bytes to be copied. |
|
Constructor for a string from a number.
Parameters:
value | Number. |
~ |
Destructor.
inline const char* |
[const]
Get string data.
Returns: String data.
inline cardinal |
[const]
Get string length.
Returns: Length in bytes.
inline bool |
[const]
Check, if string is NULL.
Returns: true, if string is NULL; false otherwise.
inline integer |
[const]
Find first position of a character in string.
Parameters:
c | Character. |
Returns: Position of -1, if character is not in string.
inline integer |
[const]
Find last position of a character in string.
Parameters:
c | Character. |
Returns: Position of -1, if character is not in string.
inline integer |
[const]
Find first position of a string in a string
Parameters:
string | String to find in string. |
Returns: Position of -1, if string is not in string.
String |
[const]
Get uppercase string from string.
Returns: Uppercase string.
String |
[const]
Get lowercase string from string.
Returns: Lowercase string.
String |
[const]
Get left part of string.
Parameters:
maxChars | Maximum number of characters to be copied. |
Returns: String.
String |
[const]
Get middle part of string.
Parameters:
start | Start position in String. |
maxChars | Maximum number of characters to be copied. |
Returns: String.
inline String |
[const]
Get part from start to end of string.
Parameters:
start | Start position in String. |
Returns: String.
String |
[const]
Get right part of string.
Parameters:
maxChars | Maximum number of characters to be copied. |
Returns: String.
String |
[const]
Get string with spaces from beginning and end of the string removed.
Returns: New string.
bool |
[const]
Scan setting string, e.g. " FileName = Test.file ". Spaces are removed, the first string (name) is converted to uppercase. The second string (value) may contain "-chars for values with spaces. The "-chars will be removed from the result.
Parameters:
name | Reference to store the name. |
value | Reference to store the value. |
Returns: true, if scan was successful; false otherwise.
String& |
Implementation of = operator.
String& |
Implementation of = operator.
String& |
Implementation of = operator.
inline int |
[const]
Implementation of == operator.
inline int |
[const]
Implementation of != operator.
inline int |
[const]
Implementation of < operator.
inline int |
[const]
Implementation of <= operator.
inline int |
[const]
Implementation of > operator.
inline int |
[const]
Implementation of >= operator.
inline char |
[const]
Implementation of [] operator.
inline cardinal |
[static]
Compute length of a string.
Parameters:
string | String. |
Returns: Length.
inline integer |
[static]
Compare two strings.
Parameters:
str1 | First string. |
str2 | Second string. |
Returns: str1 < str1 => -1; str1 == str2 => 0; str1 > str2 => 1.
inline char* |
[static]
Duplicate a string. The new string can be deallocated with the delete operator.
Parameters:
string | String to be duplicated. |
Returns: New string.