String.
More...
#include <strings.h>
List of all members.
Detailed Description
String.
This class implements the String datatype.
- Author:
- Thomas Dreibholz
- Version:
- 1.0
Constructor & Destructor Documentation
Constructor for an empty string.
Constructor for a copy of a string.
- Parameters:
-
Constructor for a copy of a string.
- Parameters:
-
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:
-
Member Function Documentation
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.
Get string data.
- Returns:
- String data.
Find first position of a character in string.
- Parameters:
-
- Returns:
- Position of -1, if character is not in string.
Check, if string is NULL.
- Returns:
- true, if string is NULL; false otherwise.
Get left part of string.
- Parameters:
-
maxChars | Maximum number of characters to be copied. |
- Returns:
- String.
Get string length.
- Returns:
- Length in bytes.
Get middle part of string.
- Parameters:
-
start | Start position in String. |
maxChars | Maximum number of characters to be copied. |
- Returns:
- String.
Get part from start to end of string.
- Parameters:
-
start | Start position in String. |
- Returns:
- String.
int String::operator!= |
( |
const String & |
string | ) |
const [inline] |
Implementation of != operator.
int String::operator< |
( |
const String & |
string | ) |
const [inline] |
Implementation of < operator.
int String::operator<= |
( |
const String & |
string | ) |
const [inline] |
Implementation of <= operator.
Implementation of = operator.
String & String::operator= |
( |
const char * |
string | ) |
|
Implementation of = operator.
Implementation of = operator.
int String::operator== |
( |
const String & |
string | ) |
const [inline] |
Implementation of == operator.
int String::operator> |
( |
const String & |
string | ) |
const [inline] |
Implementation of > operator.
int String::operator>= |
( |
const String & |
string | ) |
const [inline] |
Implementation of >= operator.
char String::operator[] |
( |
const int |
index | ) |
const [inline] |
Implementation of [] operator.
Get right part of string.
- Parameters:
-
maxChars | Maximum number of characters to be copied. |
- Returns:
- String.
Find last position of a character in string.
- Parameters:
-
- Returns:
- Position of -1, if character is not in string.
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.
Compare two strings.
- Parameters:
-
str1 | First string. |
str2 | Second string. |
- Returns:
- str1 < str1 => -1; str1 == str2 => 0; str1 > str2 => 1.
Duplicate a string. The new string can be deallocated with the delete operator.
- Parameters:
-
string | String to be duplicated. |
- Returns:
- New string.
Compute length of a string.
- Parameters:
-
- Returns:
- Length.
Get string with spaces from beginning and end of the string removed.
- Returns:
- New string.
Get lowercase string from string.
- Returns:
- Lowercase string.
Get uppercase string from string.
- Returns:
- Uppercase string.
Member Data Documentation
The documentation for this class was generated from the following files: