#include <String.h>
Many times when we work with strings we leave BIG memory leaks in our programs, the main idea here is to help the programmer by providing here a very complete strig treatment tool for everyday use.
Definition at line 29 of file String.h.
Public Member Functions | |
String () | |
Mandatory Default constructor. | |
String (const String &s) | |
Instantiates a String object by copying another. | |
String (const char *s) | |
Instantiates an String object by copying an array of characters. | |
String (const Int32 n) | |
Instantiates an String object from a numeric data-type. | |
String (const UInt32 n) | |
Instantiates an String object from a numeric data-type. | |
String (const Int64 n) | |
Instantiates an String object from a numeric data-type. | |
String (const UInt64 n) | |
Instantiates an String object from a numeric data-type. | |
String (const float n) | |
Instantiates an String object from a floating-point data-type. | |
String (const double n) | |
Instantiates an String object from a floating-point data-type. | |
String (const long double n) | |
Instantiates an String object from a floating-point data-type. | |
String (const std::string &s) | |
Instantiates a String object from a std::string object. | |
String (const std::string *s) | |
Instantiates a String object from a std::string object. | |
String (const xvr2::Object &o) | |
String & | assign (const Int32 n) |
Transforms the given argument and sets it to the current String. | |
String & | assign (const Int64 n) |
Transforms the given argument and sets it to the current String. | |
String & | assign (const UInt32 n) |
Transforms the given argument and sets it to the current String. | |
String & | assign (const UInt64 n) |
Transforms the given argument and sets it to the current String. | |
String & | assign (const float n) |
Transforms the given argument and sets it to the current String. | |
String & | assign (const double n) |
Transforms the given argument and sets it to the current String. | |
String & | assign (const long double n) |
Transforms the given argument and sets it to the current String. | |
String & | assign (const char c) |
Replaces the contents of the String with the given character. | |
String & | assign (const char *sstr) |
Replaces the contents of the String with the given array of characters. | |
String & | assign (const std::string *s) |
Replaces the contents of the String with the contents of the given std::string object. | |
String & | assign (const String &sstr) |
Replaces the contents of the String with the contents of another String object. | |
String & | concat (const char *s) |
Concatenates (appends) the given argument to the contents of the String. | |
String & | concat (const char c) |
Concatenates (appends) the given argument to the contents of the String. | |
String & | concat (const String &s) |
Concatenates (appends) the given argument to the contents of the String. | |
String & | concat (const Int32 n) |
Concatenates (appends) the given numeric argument (after transforming it) to the contents of the String. | |
String & | concat (const Int64 n) |
Concatenates (appends) the given numeric argument (after transforming it) to the contents of the String. | |
String & | concat (const UInt32 n) |
Concatenates (appends) the given numeric argument (after transforming it) to the contents of the String. | |
String & | concat (const UInt64 n) |
Concatenates (appends) the given numeric argument (after transforming it) to the contents of the String. | |
String & | concat (const float n) |
Concatenates (appends) the given numeric argument (after transforming it) to the contents of the String. | |
String & | concat (const double n) |
Concatenates (appends) the given numeric argument (after transforming it) to the contents of the String. | |
String & | concat (const long double n) |
Concatenates (appends) the given numeric argument (after transforming it) to the contents of the String. | |
String & | operator= (const Int32 n) |
Same as the String::assign methods. | |
String & | operator= (const UInt32 n) |
Same as the String::assign methods. | |
String & | operator= (const Int64 n) |
Same as the String::assign methods. | |
String & | operator= (const UInt64 n) |
Same as the String::assign methods. | |
String & | operator= (const float n) |
Same as the String::assign methods. | |
String & | operator= (const double n) |
Same as the String::assign methods. | |
String & | operator= (const long double n) |
Same as the String::assign methods. | |
String & | operator= (const String &s) |
Same as the String::assign methods. | |
const String & | operator+= (const String &s) |
const String & | operator+= (const Int32 n) |
Same as the String::concat methods. | |
const String & | operator+= (const UInt32 n) |
Same as the String::concat methods. | |
const String & | operator+= (const Int64 n) |
Same as the String::concat methods. | |
const String & | operator+= (const UInt64 n) |
Same as the String::concat methods. | |
const String & | operator+= (const float n) |
Same as the String::concat methods. | |
const String & | operator+= (const double n) |
Same as the String::concat methods. | |
const String & | operator+= (const long double n) |
Same as the String::concat methods. | |
const String & | toUpperCase () |
Transforms all characters to uppercase. | |
const String & | toLowerCase () |
Transforms all characters to lowercase. | |
const int | toInt () |
Converts the string contents to an integer if possible. | |
const unsigned int | toUInt () |
Converts the string contents to an unsigned integer if possible. | |
const float | toFloat () |
Transforms the contents of the string to a float if the string can't be translated to a number then the exception NumberException is thrown. | |
const double | toDouble () |
Transforms the contents of the string to a double if the string can't be translated to a number then the exception NumberException is thrown. | |
const long double | toLongDouble () |
Transforms the contents of the string to a long double if the string can't be translated to a number then the exception NumberException is thrown. | |
const Int64 | toInt64 () |
Transforms the contents of the string to a Int64 if the string can't be translated to a number then the exception NumberException is thrown. | |
const bool | operator== (const Int32 n) |
Same as the String::equals methods. | |
const bool | operator== (const UInt32 n) |
Same as the String::equals methods. | |
const bool | operator== (const Int64 n) |
Same as the String::equals methods. | |
const bool | operator== (const UInt64 n) |
Same as the String::equals methods. | |
const bool | operator== (const float n) |
Same as the String::equals methods. | |
const bool | operator== (const double n) |
Same as the String::equals methods. | |
const bool | operator== (const long double n) |
Same as the String::equals methods. | |
const bool | operator!= (const Int32 n) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents. | |
const bool | operator!= (const UInt32 n) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents. | |
const bool | operator!= (const Int64 n) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents. | |
const bool | operator!= (const UInt64 n) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents. | |
const bool | operator!= (const float n) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents. | |
const bool | operator!= (const double n) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents. | |
const bool | operator!= (const long double n) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents. | |
int | compare (const String &s) const |
Performs a lexicographic comparison between two String. | |
bool | equals (const char c) const |
Verifies if the String contents are the same as textual form of the given argument. | |
bool | equals (const String &s) const |
Tells wheter two String have the same contents. | |
bool | equals (const String &s) |
Tells wheter two String have the same contents. | |
const bool | equals (const Int32 n) |
Verifies if the String contents are the same as textual form of the given argument. | |
const bool | equals (const UInt32 n) |
Verifies if the String contents are the same as textual form of the given argument. | |
const bool | equals (const Int64 n) |
Verifies if the String contents are the same as textual form of the given argument. | |
const bool | equals (const UInt64 n) |
Verifies if the String contents are the same as textual form of the given argument. | |
const bool | equals (const float n) |
Verifies if the String contents are the same as textual form of the given argument. | |
const bool | equals (const double n) |
Verifies if the String contents are the same as textual form of the given argument. | |
const bool | equals (const long double n) |
Verifies if the String contents are the same as textual form of the given argument. | |
bool | startsIWith (const char *s) const |
Tells if the string starts with the given substring regardless of its case (upper or lower). | |
bool | startsWith (const String &s) const |
Tells if the string starts with the given substring taking care that each character case matches. | |
bool | endsIWith (const char *s) const |
Tells if the string ends with the given substring regardless of its case (upper or lower). | |
bool | endsWith (const String &s) const |
Tells if the string ends with the given substring taking care that each character case matches. | |
String | getSubstr (int start, int end) |
Lets you retrieve a substring from the current string. | |
virtual std::string | toString () |
Converts this String to a std::string. | |
void | eat (const char *data, int len) |
Will append an arbitrary amount characters from the given array. | |
virtual String & | trimLeft (const char c= ' ') |
Erases all contiguous occurrences of a specified character from the beginning of the string to the right. | |
virtual String & | trimRight (const char c= ' ') |
Erases all contiguous occurrences of a specified character from the end of the string to the left. | |
virtual int | index (const char *s) |
Returns the location (from left to right) of the first ocurrence of s. | |
virtual int | index (const char *s) const |
Returns the location (from left to right) of the first ocurrence of s. | |
virtual int | index (const BasicString< char > &s) |
Returns the location (from left to right) of the first ocurrence of s. | |
virtual int | rindex (const char *s) |
Returns the location (from right to left) of the first ocurrence of s. | |
virtual int | rindex (const char *s) const |
Returns the location (from right to left) of the first ocurrence of s. | |
virtual int | rindex (const BasicString< char > &s) |
Returns the location (from right to left) of the first ocurrence of s. | |
BasicString< char > & | biteLeft (UInt32 howmany=1) |
Erases an amount of characters starting from the left. | |
BasicString< char > & | biteRight (UInt32 howmany=1) |
Erases an amount of characters starting from right to left. | |
BasicString< char > & | deleteFirst () |
Erases the first character from the string itself. | |
BasicString< char > & | deleteLast () |
Erases the last character from the string itself. | |
virtual BasicString< char > & | trim (const charc= ' ') |
Combines BasicString::trimLeft and BasicString::trimRight. | |
virtual bool | equals (const char *s) |
Verifies if the string is EXACTLY the same as the given argument. | |
virtual bool | equals (const BasicString< char > &s) |
Verifies if the string is EXACTLY the same as the given argument. | |
virtual bool | equals (const BasicString< char > &s) const |
Verifies if the string is EXACTLY the same as the given argument. | |
virtual bool | operator== (const char *s) |
Verifies if the string is EXACTLY the same as the given argument. | |
virtual bool | operator== (const BasicString< char > &s) |
Verifies if the string is EXACTLY the same as the given argument. | |
void | deleteString () |
Deletes the string contents. | |
const char * | toCharPtr () const |
Converts the string to an array of characters. | |
const char * | toCharPtr () |
Converts the string to an array of characters. | |
const char | charAt (int i) const |
Gets the character located at the given position. | |
const char | charAt (int i) |
Gets the character located at the given position. | |
const char | operator[] (int i) |
Gets the character located at the given position. | |
const char | operator[] (int i) const |
Gets the character located at the given position. | |
bool | startsWith (const char *s) const |
Tells if the string starts with the given substring. | |
bool | endsWith (const char *s) const |
Tells if the string ends with the given substring. | |
BasicString< char > & | deleteCharAt (int pos) |
Erases a character at the given position. | |
BasicString< char > & | insertCharAt (const int pos, const charc) |
Insert a specifig character at the given position. | |
BasicString< char > & | replace (const charfrom, const char *to) |
Replaces all occurrences of a character with the given character array. | |
virtual const char * | getClassName () |
Returns the name of the current class. | |
Static Public Member Functions | |
static void | debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Will print a debug message to the screen. | |
static void | debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Protected Attributes | |
std::string | __cls_name |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const String &s) |
Lets you send the contents of a String an std::ostream. | |
std::ostream & | operator<< (std::ostream &stream, const Object &s) |
xvr2::String::String | ( | ) |
Mandatory Default constructor.
xvr2::String::String | ( | const String & | s | ) |
xvr2::String::String | ( | const char * | s | ) |
Instantiates an String object by copying an array of characters.
s | A null-terminated array of characters to be copied |
xvr2::String::String | ( | const Int32 | n | ) |
Instantiates an String object from a numeric data-type.
This method will try to convert the given argument to a valid string equivalent.
n | An Int32 integer. |
xvr2::String::String | ( | const UInt32 | n | ) |
Instantiates an String object from a numeric data-type.
This method will try to convert the given argument to a valid string equivalent.
n | An UInt32 integer. |
xvr2::String::String | ( | const Int64 | n | ) |
Instantiates an String object from a numeric data-type.
This method will try to convert the given argument to a valid string equivalent.
n | An Int64 integer. |
xvr2::String::String | ( | const UInt64 | n | ) |
Instantiates an String object from a numeric data-type.
This method will try to convert the given argument to a valid string equivalent.
n | An UInt64 integer. |
xvr2::String::String | ( | const float | n | ) |
Instantiates an String object from a floating-point data-type.
This method will try to convert the given argument to a valid string equivalent.
n | The float number. |
xvr2::String::String | ( | const double | n | ) |
Instantiates an String object from a floating-point data-type.
This method will try to convert the given argument to a valid string equivalent.
n | The double number. |
xvr2::String::String | ( | const long double | n | ) |
Instantiates an String object from a floating-point data-type.
This method will try to convert the given argument to a valid string equivalent.
n | The long double number. |
xvr2::String::String | ( | const std::string & | s | ) |
xvr2::String::String | ( | const std::string * | s | ) |
xvr2::String::String | ( | const xvr2::Object & | o | ) |
String& xvr2::String::assign | ( | const float | n | ) |
String& xvr2::String::assign | ( | const double | n | ) |
String& xvr2::String::assign | ( | const long double | n | ) |
String& xvr2::String::assign | ( | const char | c | ) |
String& xvr2::String::assign | ( | const char * | sstr | ) |
String& xvr2::String::assign | ( | const std::string * | s | ) |
String& xvr2::String::concat | ( | const char * | s | ) |
String& xvr2::String::concat | ( | const char | c | ) |
String& xvr2::String::concat | ( | const float | n | ) |
String& xvr2::String::concat | ( | const double | n | ) |
String& xvr2::String::concat | ( | const long double | n | ) |
String& xvr2::String::operator= | ( | const float | n | ) |
String& xvr2::String::operator= | ( | const double | n | ) |
String& xvr2::String::operator= | ( | const long double | n | ) |
const String& xvr2::String::operator+= | ( | const float | n | ) |
const String& xvr2::String::operator+= | ( | const double | n | ) |
const String& xvr2::String::operator+= | ( | const long double | n | ) |
const String& xvr2::String::toUpperCase | ( | ) |
Transforms all characters to uppercase.
const String& xvr2::String::toLowerCase | ( | ) |
Transforms all characters to lowercase.
const int xvr2::String::toInt | ( | ) |
Converts the string contents to an integer if possible.
xvr2::NumberException | if the String couldn't be converted. |
const unsigned int xvr2::String::toUInt | ( | ) |
Converts the string contents to an unsigned integer if possible.
xvr2::NumberException | if the String couldn't be converted. |
const float xvr2::String::toFloat | ( | ) |
Transforms the contents of the string to a float if the string can't be translated to a number then the exception NumberException is thrown.
const double xvr2::String::toDouble | ( | ) |
Transforms the contents of the string to a double if the string can't be translated to a number then the exception NumberException is thrown.
const long double xvr2::String::toLongDouble | ( | ) |
Transforms the contents of the string to a long double if the string can't be translated to a number then the exception NumberException is thrown.
const Int64 xvr2::String::toInt64 | ( | ) |
Transforms the contents of the string to a Int64 if the string can't be translated to a number then the exception NumberException is thrown.
const bool xvr2::String::operator== | ( | const Int32 | n | ) |
Same as the String::equals methods.
const bool xvr2::String::operator== | ( | const UInt32 | n | ) |
Same as the String::equals methods.
const bool xvr2::String::operator== | ( | const Int64 | n | ) |
Same as the String::equals methods.
const bool xvr2::String::operator== | ( | const UInt64 | n | ) |
Same as the String::equals methods.
const bool xvr2::String::operator== | ( | const float | n | ) |
Same as the String::equals methods.
const bool xvr2::String::operator== | ( | const double | n | ) |
Same as the String::equals methods.
const bool xvr2::String::operator== | ( | const long double | n | ) |
Same as the String::equals methods.
const bool xvr2::String::operator!= | ( | const Int32 | n | ) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents.
n | An Int32 whose textual form will be used for comparison. |
const bool xvr2::String::operator!= | ( | const UInt32 | n | ) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents.
n | An UInt32 whose textual form will be used for comparison. |
const bool xvr2::String::operator!= | ( | const Int64 | n | ) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents.
n | An Int64 whose textual form will be used for comparison. |
const bool xvr2::String::operator!= | ( | const UInt64 | n | ) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents.
n | An UInt64 whose textual form will be used for comparison. |
const bool xvr2::String::operator!= | ( | const float | n | ) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents.
n | A float whose textual form will be used for comparison. |
const bool xvr2::String::operator!= | ( | const double | n | ) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents.
n | A double whose textual form will be used for comparison. |
const bool xvr2::String::operator!= | ( | const long double | n | ) |
Inequality operator, compares if the "textual" form of the given argument is not the same as the String contents.
n | A long double whose textual form will be used for comparison. |
int xvr2::String::compare | ( | const String & | s | ) | const |
bool xvr2::String::equals | ( | const char | c | ) | const |
Verifies if the String contents are the same as textual form of the given argument.
c | A character to be compared with. |
bool xvr2::String::equals | ( | const String & | s | ) | const |
bool xvr2::String::equals | ( | const String & | s | ) |
const bool xvr2::String::equals | ( | const Int32 | n | ) |
Verifies if the String contents are the same as textual form of the given argument.
n | An Int32 to be compared with. |
const bool xvr2::String::equals | ( | const UInt32 | n | ) |
Verifies if the String contents are the same as textual form of the given argument.
n | An UInt32 to be compared with. |
const bool xvr2::String::equals | ( | const Int64 | n | ) |
Verifies if the String contents are the same as textual form of the given argument.
n | An Int64 to be compared with. |
const bool xvr2::String::equals | ( | const UInt64 | n | ) |
Verifies if the String contents are the same as textual form of the given argument.
n | An UInt64 to be compared with. |
const bool xvr2::String::equals | ( | const float | n | ) |
Verifies if the String contents are the same as textual form of the given argument.
n | A float to be compared with. |
const bool xvr2::String::equals | ( | const double | n | ) |
Verifies if the String contents are the same as textual form of the given argument.
n | A double to be compared with. |
const bool xvr2::String::equals | ( | const long double | n | ) |
Verifies if the String contents are the same as textual form of the given argument.
n | A long double to be compared with. |
bool xvr2::String::startsIWith | ( | const char * | s | ) | const |
Tells if the string starts with the given substring regardless of its case (upper or lower).
s | substring to look at the beginning. |
bool xvr2::String::startsWith | ( | const String & | s | ) | const |
Tells if the string starts with the given substring taking care that each character case matches.
s | substring to look at the beginning. |
bool xvr2::String::endsIWith | ( | const char * | s | ) | const |
Tells if the string ends with the given substring regardless of its case (upper or lower).
s | substring to look at the end. |
bool xvr2::String::endsWith | ( | const String & | s | ) | const |
Tells if the string ends with the given substring taking care that each character case matches.
s | substring to look at the end. |
String xvr2::String::getSubstr | ( | int | start, | |
int | end | |||
) |
Lets you retrieve a substring from the current string.
start | The position where the initial part of the substring we want to extract is located at. | |
end | The position at where the last character from our substring is located at. |
Reimplemented from xvr2::BasicString< char >.
virtual std::string xvr2::String::toString | ( | ) | [virtual] |
Converts this String to a std::string.
Reimplemented from xvr2::Object.
void xvr2::String::eat | ( | const char * | data, | |
int | len | |||
) |
Will append an arbitrary amount characters from the given array.
data | The array from where we will be copying, | |
len | The amount of chars to be copied from there. |
virtual String& xvr2::String::trimLeft | ( | const char | c = ' ' |
) | [virtual] |
Erases all contiguous occurrences of a specified character from the beginning of the string to the right.
c | The character to look for and erase. |
Reimplemented from xvr2::BasicString< char >.
virtual String& xvr2::String::trimRight | ( | const char | c = ' ' |
) | [virtual] |
Erases all contiguous occurrences of a specified character from the end of the string to the left.
c | The character to look for and erase. |
Reimplemented from xvr2::BasicString< char >.
virtual int xvr2::BasicString< char >::index | ( | const char * | s | ) | [inline, virtual, inherited] |
Returns the location (from left to right) of the first ocurrence of s.
s | The substring to search for. |
Definition at line 42 of file BasicString.h.
virtual int xvr2::BasicString< char >::index | ( | const char * | s | ) | const [inline, virtual, inherited] |
Returns the location (from left to right) of the first ocurrence of s.
s | The substring to search for. |
Definition at line 51 of file BasicString.h.
virtual int xvr2::BasicString< char >::index | ( | const BasicString< char > & | s | ) | [inline, virtual, inherited] |
Returns the location (from left to right) of the first ocurrence of s.
s | The substring to search for. |
Definition at line 60 of file BasicString.h.
virtual int xvr2::BasicString< char >::rindex | ( | const char * | s | ) | [inline, virtual, inherited] |
Returns the location (from right to left) of the first ocurrence of s.
s | The substring to search for. |
Definition at line 69 of file BasicString.h.
virtual int xvr2::BasicString< char >::rindex | ( | const char * | s | ) | const [inline, virtual, inherited] |
Returns the location (from right to left) of the first ocurrence of s.
s | The substring to search for. |
Definition at line 78 of file BasicString.h.
virtual int xvr2::BasicString< char >::rindex | ( | const BasicString< char > & | s | ) | [inline, virtual, inherited] |
Returns the location (from right to left) of the first ocurrence of s.
s | The substring to search for. |
Definition at line 87 of file BasicString.h.
BasicString<char >& xvr2::BasicString< char >::biteLeft | ( | UInt32 | howmany = 1 |
) | [inline, inherited] |
Erases an amount of characters starting from the left.
howmany | The amount of chars to be deleted from the beginning of the string. |
Definition at line 94 of file BasicString.h.
BasicString<char >& xvr2::BasicString< char >::biteRight | ( | UInt32 | howmany = 1 |
) | [inline, inherited] |
Erases an amount of characters starting from right to left.
howmany | The amount of chars to be deleted from the the last portions of the string backwards. |
Definition at line 111 of file BasicString.h.
BasicString<char >& xvr2::BasicString< char >::deleteFirst | ( | ) | [inline, inherited] |
Erases the first character from the string itself.
Definition at line 125 of file BasicString.h.
References xvr2::BasicString< _charT >::biteLeft().
BasicString<char >& xvr2::BasicString< char >::deleteLast | ( | ) | [inline, inherited] |
Erases the last character from the string itself.
Definition at line 130 of file BasicString.h.
References xvr2::BasicString< _charT >::biteRight().
virtual BasicString<char >& xvr2::BasicString< char >::trim | ( | const char | c = ' ' |
) | [inline, virtual, inherited] |
Combines BasicString::trimLeft and BasicString::trimRight.
c | The character to look for and erase. |
Definition at line 165 of file BasicString.h.
References xvr2::BasicString< _charT >::trimLeft(), and xvr2::BasicString< _charT >::trimRight().
virtual bool xvr2::BasicString< char >::equals | ( | const char * | s | ) | [inline, virtual, inherited] |
Verifies if the string is EXACTLY the same as the given argument.
s | The string to be compared with. |
Definition at line 174 of file BasicString.h.
virtual bool xvr2::BasicString< char >::equals | ( | const BasicString< char > & | s | ) | [inline, virtual, inherited] |
Verifies if the string is EXACTLY the same as the given argument.
s | The string to be compared with. |
Definition at line 181 of file BasicString.h.
virtual bool xvr2::BasicString< char >::equals | ( | const BasicString< char > & | s | ) | const [inline, virtual, inherited] |
Verifies if the string is EXACTLY the same as the given argument.
s | The string to be compared with. |
Definition at line 188 of file BasicString.h.
virtual bool xvr2::BasicString< char >::operator== | ( | const char * | s | ) | [inline, virtual, inherited] |
Verifies if the string is EXACTLY the same as the given argument.
s | The string to be compared with. |
Definition at line 195 of file BasicString.h.
virtual bool xvr2::BasicString< char >::operator== | ( | const BasicString< char > & | s | ) | [inline, virtual, inherited] |
Verifies if the string is EXACTLY the same as the given argument.
s | The string to be compared with. |
Definition at line 202 of file BasicString.h.
void xvr2::BasicString< char >::deleteString | ( | ) | [inline, inherited] |
const char * xvr2::BasicString< char >::toCharPtr | ( | ) | const [inline, inherited] |
Converts the string to an array of characters.
Definition at line 211 of file BasicString.h.
const char * xvr2::BasicString< char >::toCharPtr | ( | ) | [inline, inherited] |
Converts the string to an array of characters.
Definition at line 216 of file BasicString.h.
const char xvr2::BasicString< char >::charAt | ( | int | i | ) | const [inline, inherited] |
Gets the character located at the given position.
i | The position where the requested character is located at. |
Definition at line 223 of file BasicString.h.
const char xvr2::BasicString< char >::charAt | ( | int | i | ) | [inline, inherited] |
Gets the character located at the given position.
i | The position where the requested character is located at. |
Definition at line 230 of file BasicString.h.
const char xvr2::BasicString< char >::operator[] | ( | int | i | ) | [inline, inherited] |
Gets the character located at the given position.
i | The position where the requested character is located at. |
Definition at line 237 of file BasicString.h.
const char xvr2::BasicString< char >::operator[] | ( | int | i | ) | const [inline, inherited] |
Gets the character located at the given position.
i | The position where the requested character is located at. |
Definition at line 244 of file BasicString.h.
bool xvr2::BasicString< char >::startsWith | ( | const char * | s | ) | const [inline, inherited] |
Tells if the string starts with the given substring.
s | substring to look at the beginning. |
Definition at line 251 of file BasicString.h.
bool xvr2::BasicString< char >::endsWith | ( | const char * | s | ) | const [inline, inherited] |
Tells if the string ends with the given substring.
s | substring to look at the end. |
Definition at line 258 of file BasicString.h.
BasicString<char >& xvr2::BasicString< char >::deleteCharAt | ( | int | pos | ) | [inline, inherited] |
Erases a character at the given position.
pos | The position (from left to right) where the character we want to delete is located at. |
Definition at line 269 of file BasicString.h.
BasicString<char >& xvr2::BasicString< char >::insertCharAt | ( | const int | pos, | |
const char | c | |||
) | [inline, inherited] |
Insert a specifig character at the given position.
pos | The position at where we want to place the character | |
c | The character we want to insert. |
Definition at line 277 of file BasicString.h.
BasicString<char >& xvr2::BasicString< char >::replace | ( | const char | from, | |
const char * | to | |||
) | [inline, inherited] |
Replaces all occurrences of a character with the given character array.
from | The character we wish to replace. | |
to | The array of characters wish will be used as replacement. |
Definition at line 296 of file BasicString.h.
References xvr2::BasicString< _charT >::charAt().
virtual const char* xvr2::Object::getClassName | ( | ) | [virtual, inherited] |
Returns the name of the current class.
static void xvr2::Object::debugmsg | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
Will print a debug message to the screen.
static void xvr2::Object::debugmsgln | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
std::ostream& operator<< | ( | std::ostream & | stream, | |
const String & | s | |||
) | [friend] |
Lets you send the contents of a String an std::ostream.
This method allows you to do something like:
String a = "hello world"; std::cout << a << std::endl;
stream | The std::ostream which is to receive the String contents. | |
s | The String to be sent. |
std::ostream& operator<< | ( | std::ostream & | stream, | |
const Object & | s | |||
) | [friend, inherited] |
std::string xvr2::Object::__cls_name [protected, inherited] |