#include <BasicString.h>
Definition at line 27 of file BasicString.h.
Public Member Functions | |
~BasicString () | |
virtual int | index (const _charT *s) |
Returns the location (from left to right) of the first ocurrence of s. | |
virtual int | index (const _charT *s) const |
Returns the location (from left to right) of the first ocurrence of s. | |
virtual int | index (const BasicString< _charT > &s) |
Returns the location (from left to right) of the first ocurrence of s. | |
virtual int | rindex (const _charT *s) |
Returns the location (from right to left) of the first ocurrence of s. | |
virtual int | rindex (const _charT *s) const |
Returns the location (from right to left) of the first ocurrence of s. | |
virtual int | rindex (const BasicString< _charT > &s) |
Returns the location (from right to left) of the first ocurrence of s. | |
BasicString< _charT > & | biteLeft (UInt32 howmany=1) |
Erases an amount of characters starting from the left. | |
BasicString< _charT > & | biteRight (UInt32 howmany=1) |
Erases an amount of characters starting from right to left. | |
BasicString< _charT > & | deleteFirst () |
Erases the first character from the string itself. | |
BasicString< _charT > & | deleteLast () |
Erases the last character from the string itself. | |
virtual BasicString< _charT > & | trimLeft (const _charT c= ' ') |
Erases all contiguous occurrences of a specified character from the beginning of the string to the right. | |
virtual BasicString< _charT > & | trimRight (const _charT c= ' ') |
Erases all contiguous occurrences of a specified character from the end of the string to the left. | |
virtual BasicString< _charT > & | trim (const _charT c= ' ') |
Combines BasicString::trimLeft and BasicString::trimRight. | |
virtual bool | equals (const _charT *s) |
Verifies if the string is EXACTLY the same as the given argument. | |
virtual bool | equals (const BasicString< _charT > &s) |
Verifies if the string is EXACTLY the same as the given argument. | |
virtual bool | equals (const BasicString< _charT > &s) const |
Verifies if the string is EXACTLY the same as the given argument. | |
virtual bool | operator== (const _charT *s) |
Verifies if the string is EXACTLY the same as the given argument. | |
virtual bool | operator== (const BasicString< _charT > &s) |
Verifies if the string is EXACTLY the same as the given argument. | |
void | deleteString () |
Deletes the string contents. | |
const _charT * | toCharPtr () const |
Converts the string to an array of characters. | |
const _charT * | toCharPtr () |
Converts the string to an array of characters. | |
const _charT | charAt (int i) const |
Gets the character located at the given position. | |
const _charT | charAt (int i) |
Gets the character located at the given position. | |
const _charT | operator[] (int i) |
Gets the character located at the given position. | |
const _charT | operator[] (int i) const |
Gets the character located at the given position. | |
bool | startsWith (const _charT *s) const |
Tells if the string starts with the given substring. | |
bool | endsWith (const _charT *s) const |
Tells if the string ends with the given substring. | |
BasicString< _charT > & | deleteCharAt (int pos) |
Erases a character at the given position. | |
BasicString< _charT > & | insertCharAt (const int pos, const _charT c) |
Insert a specifig character at the given position. | |
BasicString< _charT > | getSubstr (int start, int end) |
Lets you retrieve a substring from the current string. | |
BasicString< _charT > & | replace (const _charT from, const _charT *to) |
Replaces all occurrences of a character with the given character array. | |
virtual const char * | getClassName () |
Returns the name of the current class. | |
virtual std::string | toString () |
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 Member Functions | |
BasicString () | |
BasicString (const _charT *s) | |
Protected Attributes | |
std::string | __cls_name |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const Object &s) |
xvr2::BasicString< _charT >::BasicString | ( | ) | [inline, protected] |
Definition at line 29 of file BasicString.h.
xvr2::BasicString< _charT >::BasicString | ( | const _charT * | s | ) | [inline, protected] |
Definition at line 31 of file BasicString.h.
xvr2::BasicString< _charT >::~BasicString | ( | ) | [inline] |
Definition at line 35 of file BasicString.h.
virtual int xvr2::BasicString< _charT >::index | ( | const _charT * | s | ) | [inline, virtual] |
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< _charT >::index | ( | const _charT * | s | ) | const [inline, virtual] |
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< _charT >::index | ( | const BasicString< _charT > & | s | ) | [inline, virtual] |
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< _charT >::rindex | ( | const _charT * | s | ) | [inline, virtual] |
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< _charT >::rindex | ( | const _charT * | s | ) | const [inline, virtual] |
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< _charT >::rindex | ( | const BasicString< _charT > & | s | ) | [inline, virtual] |
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<_charT>& xvr2::BasicString< _charT >::biteLeft | ( | UInt32 | howmany = 1 |
) | [inline] |
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.
Referenced by xvr2::BasicString< char >::deleteFirst().
BasicString<_charT>& xvr2::BasicString< _charT >::biteRight | ( | UInt32 | howmany = 1 |
) | [inline] |
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.
Referenced by xvr2::BasicString< char >::deleteLast().
BasicString<_charT>& xvr2::BasicString< _charT >::deleteFirst | ( | ) | [inline] |
Erases the first character from the string itself.
Definition at line 125 of file BasicString.h.
BasicString<_charT>& xvr2::BasicString< _charT >::deleteLast | ( | ) | [inline] |
Erases the last character from the string itself.
Definition at line 130 of file BasicString.h.
virtual BasicString<_charT>& xvr2::BasicString< _charT >::trimLeft | ( | const _charT | c = ' ' |
) | [inline, 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 in xvr2::String.
Definition at line 137 of file BasicString.h.
Referenced by xvr2::BasicString< char >::trim().
virtual BasicString<_charT>& xvr2::BasicString< _charT >::trimRight | ( | const _charT | c = ' ' |
) | [inline, 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 in xvr2::String.
Definition at line 151 of file BasicString.h.
Referenced by xvr2::BasicString< char >::trim().
virtual BasicString<_charT>& xvr2::BasicString< _charT >::trim | ( | const _charT | c = ' ' |
) | [inline, virtual] |
Combines BasicString::trimLeft and BasicString::trimRight.
c | The character to look for and erase. |
Definition at line 165 of file BasicString.h.
virtual bool xvr2::BasicString< _charT >::equals | ( | const _charT * | s | ) | [inline, virtual] |
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< _charT >::equals | ( | const BasicString< _charT > & | s | ) | [inline, virtual] |
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< _charT >::equals | ( | const BasicString< _charT > & | s | ) | const [inline, virtual] |
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< _charT >::operator== | ( | const _charT * | s | ) | [inline, virtual] |
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< _charT >::operator== | ( | const BasicString< _charT > & | s | ) | [inline, virtual] |
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< _charT >::deleteString | ( | ) | [inline] |
const _charT* xvr2::BasicString< _charT >::toCharPtr | ( | ) | const [inline] |
Converts the string to an array of characters.
Definition at line 211 of file BasicString.h.
Referenced by xvr2::Net::URI::_cmpf::operator()().
const _charT* xvr2::BasicString< _charT >::toCharPtr | ( | ) | [inline] |
Converts the string to an array of characters.
Definition at line 216 of file BasicString.h.
const _charT xvr2::BasicString< _charT >::charAt | ( | int | i | ) | const [inline] |
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.
Referenced by xvr2::BasicString< char >::replace().
const _charT xvr2::BasicString< _charT >::charAt | ( | int | i | ) | [inline] |
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 _charT xvr2::BasicString< _charT >::operator[] | ( | int | i | ) | [inline] |
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 _charT xvr2::BasicString< _charT >::operator[] | ( | int | i | ) | const [inline] |
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< _charT >::startsWith | ( | const _charT * | s | ) | const [inline] |
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< _charT >::endsWith | ( | const _charT * | s | ) | const [inline] |
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<_charT>& xvr2::BasicString< _charT >::deleteCharAt | ( | int | pos | ) | [inline] |
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<_charT>& xvr2::BasicString< _charT >::insertCharAt | ( | const int | pos, | |
const _charT | c | |||
) | [inline] |
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<_charT> xvr2::BasicString< _charT >::getSubstr | ( | int | start, | |
int | end | |||
) | [inline] |
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 in xvr2::String.
Definition at line 287 of file BasicString.h.
BasicString<_charT>& xvr2::BasicString< _charT >::replace | ( | const _charT | from, | |
const _charT * | to | |||
) | [inline] |
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.
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] |
virtual std::string xvr2::Object::toString | ( | ) | [virtual, inherited] |
std::ostream& operator<< | ( | std::ostream & | stream, | |
const Object & | s | |||
) | [friend, inherited] |
std::string xvr2::Object::__cls_name [protected, inherited] |