Basic string class. More...
#include <fbstring.h>
Public Member Functions | |
FBString ()=default | |
Constructor. More... | |
FBString (const char *pStr) | |
Constructor from a string. More... | |
FBString (const FBString &pStr) | |
Copy constructor. More... | |
FBString (const char *p1Str, const char *p2Str) | |
Constructor from the concatenation of two strings. More... | |
~FBString () | |
Destructor. More... | |
operator char * () const | |
Overloaded char* conversion operator. More... | |
operator const char * () const | |
char | operator[] (unsigned int pIndex) const |
Overloaded [] operator. More... | |
const FBString & | operator= (const char *pStr) |
Overloaded = operator with a string. More... | |
const FBString & | operator= (const FBString &pStr) |
Overloaded = operator with an FBString. More... | |
bool | operator== (const FBString &pStr) const |
Overloaded == operator with a string. More... | |
bool | operator== (const char *pStr) const |
bool | operator== (char *pStr) const |
bool | operator!= (const FBString &pStr) const |
Overloaded != operator with a string. More... | |
bool | operator!= (const char *pStr) const |
bool | operator!= (char *pStr) const |
const FBString & | operator+= (const char pChr) |
Overloaded += operator with a char. More... | |
const FBString & | operator+= (const char *pStr) |
Overloaded += operator with a string. More... | |
FBString | operator+ (const char *pStr) |
Overloaded + operator with a string. More... | |
FBString | Mid (unsigned int pStart, unsigned int pLen) const |
Extracts a substring of length a specified length from a certain position. More... | |
FBString | Left (unsigned int pLen) const |
Extracts the first pLen characters from this string. More... | |
FBString | Right (unsigned int pLen) const |
Extracts the last pLen characters from this string. More... | |
unsigned int | GetLen () const |
Get the number of characters in this string. More... | |
bool | IsEmpty () const |
This method determines whether the string is empty or not. More... | |
int | Find (char pCar) const |
Find first occurrence of the specified character. More... | |
int | ReverseFind (char pCar) const |
Find last occurrence of the specified character. More... | |
Basic string class.
Provides basic string manipulation functionality (dynamic sizing, operator overloads).
Definition at line 66 of file fbstring.h.
|
default |
Constructor.
FBString | ( | const char * | pStr | ) |
Constructor from a string.
pStr | String to copy. |
FBString | ( | const char * | p1Str, |
const char * | p2Str | ||
) |
Constructor from the concatenation of two strings.
p1Str | First string to copy. |
p2Str | Second string to copy. |
~FBString | ( | ) |
Destructor.
int Find | ( | char | pCar | ) | const |
Find first occurrence of the specified character.
pCar | Character to find in the string. |
unsigned int GetLen | ( | ) | const |
Get the number of characters in this string.
bool IsEmpty | ( | ) | const |
This method determines whether the string is empty or not.
FBString Left | ( | unsigned int | pLen | ) | const |
Extracts the first pLen characters from this string.
pLen | Number of characters to extract. |
FBString Mid | ( | unsigned int | pStart, |
unsigned int | pLen | ||
) | const |
Extracts a substring of length a specified length from a certain position.
pStart | Index of start. |
pLen | Number of character to extract. |
operator char * | ( | ) | const |
Overloaded char* conversion operator.
bool operator!= | ( | const FBString & | pStr | ) | const |
Overloaded != operator with a string.
pStr | String to compare with (char*) |
FBString operator+ | ( | const char * | pStr | ) |
Overloaded + operator with a string.
pStr | String to add. |
const FBString& operator+= | ( | const char * | pStr | ) |
Overloaded += operator with a string.
pStr | String to concatenate to this. |
const FBString& operator+= | ( | const char | pChr | ) |
Overloaded += operator with a char.
pChr | Char to concatenate to this. |
const FBString& operator= | ( | const char * | pStr | ) |
Overloaded = operator with a string.
pStr | String to copy (char*). |
bool operator== | ( | const FBString & | pStr | ) | const |
Overloaded == operator with a string.
pStr | String to compare with (char*). |
char operator[] | ( | unsigned int | pIndex | ) | const |
Overloaded [] operator.
pIndex | Index to read character from. |
int ReverseFind | ( | char | pCar | ) | const |
Find last occurrence of the specified character.
pCar | Character to find in the string. |
FBString Right | ( | unsigned int | pLen | ) | const |
Extracts the last pLen characters from this string.
pLen | Number of characters to extract. |