|
| BufferString () |
|
| BufferString (const BufferString &) |
|
| BufferString (const char *) |
|
template<class T > |
| BufferString (const char *, const T &, const char *s=nullptr) |
|
| BufferString (const OD::String &) |
|
| BufferString (const QString &) |
|
template<class T > |
| BufferString (const T &) |
|
| BufferString (int minlen, bool setnull) |
|
virtual | ~BufferString () |
|
BufferString & | add (char) |
|
BufferString & | add (const char *) |
|
BufferString & | add (const OD::String &s) |
|
BufferString & | add (const QString &) |
|
template<class T > |
BufferString & | add (const T &) |
|
BufferString & | add (double, int nrdec) |
|
BufferString & | add (float, int nrdec) |
|
BufferString & | addLim (double, int maxnrchars) |
|
BufferString & | addLim (float, int maxnrchars) |
|
BufferString & | addNewLine (int nrnewlines=1) |
|
BufferString & | addSpace (int nrspaces=1) |
|
BufferString & | addTab (int nrtabs=1) |
|
unsigned int | bufSize () const |
|
BufferString & | clean (CleanType ct=OnlyAlphaNum) |
|
BufferString & | embed (char open, char close) |
|
void | fill (char *, int maxnrchar) const |
| fill old C-style char buf More...
|
|
char * | find (char) |
|
const char * | find (char) const |
|
char * | find (const char *) |
|
const char * | find (const char *) const |
|
char * | findLast (char) |
|
const char * | findLast (char) const |
|
char * | findLast (const char *) |
|
const char * | findLast (const char *) const |
|
char & | first () |
|
char * | getCStr () |
|
BufferString & | insertAt (int idx, const char *) |
|
char & | last () |
|
unsigned int | minBufSize () const |
|
| operator const char * () const |
|
bool | operator!= (const BufferString &) const |
|
bool | operator!= (const char *) const |
|
bool | operator!= (const FixedString &) const |
|
bool | operator!= (const OD::String &) const |
|
BufferString & | operator+= (const char *s) |
|
BufferString & | operator+= (const OD::String &s) |
|
template<class T > |
BufferString & | operator+= (const T &t) |
|
BufferString & | operator= (const BufferString &b) |
|
BufferString & | operator= (const char *s) |
|
BufferString & | operator= (const FixedString &s) |
|
BufferString & | operator= (const OD::String &s) |
|
template<class T > |
BufferString & | operator= (const T &) |
|
bool | operator== (const BufferString &) const |
|
bool | operator== (const char *) const |
|
bool | operator== (const FixedString &) const |
|
bool | operator== (const OD::String &) const |
|
char & | operator[] (int idx) |
|
BufferString & | quote (char q='\'') |
|
BufferString & | remove (char) |
|
BufferString & | remove (const char *s) |
|
BufferString & | replace (char from, char to) |
|
BufferString & | replace (const char *from, const char *to) |
|
BufferString & | replaceAt (int idx, const char *, bool cutoff=true) |
|
BufferString & | set (const char *) |
|
BufferString & | set (const OD::String &s) |
|
template<class T > |
BufferString & | set (const T &) |
|
BufferString & | set (double, int nrdec) |
|
BufferString & | set (float, int nrdec) |
|
bool | setBufSize (unsigned int) |
|
BufferString & | setEmpty () |
|
BufferString & | setLim (double, int maxnrchars) |
|
BufferString & | setLim (float, int maxnrchars) |
|
void | setMinBufSize (unsigned int) |
|
BufferString & | toLower () |
|
BufferString & | toUpper () |
|
BufferString & | trimBlanks () |
| removes front and back whitespaces More...
|
|
BufferString & | unEmbed (char open, char close) |
|
BufferString & | unQuote (char q='\'') |
|
virtual | ~String () |
|
const char * | buf () const |
|
bool | contains (char) const |
|
bool | contains (const char *) const |
|
unsigned int | count (char) const |
|
bool | endsWith (const char *, CaseSensitivity c=CaseSensitive) const |
|
const char * | find (char) const |
|
const char * | find (const char *) const |
|
const char * | findLast (char) const |
|
const char * | findLast (const char *) const |
|
virtual char | firstChar () const |
|
unsigned int | getLevenshteinDist (const char *, bool casesens) const |
|
bool | isEmpty () const |
|
bool | isEndOf (const char *, CaseSensitivity c=CaseSensitive) const |
|
bool | isEqual (const char *, CaseSensitivity c=CaseSensitive) const |
|
bool | isNumber (bool int_only=false) const |
|
bool | isStartOf (const char *, CaseSensitivity c=CaseSensitive) const |
|
bool | isYesNo () const |
|
virtual char | lastChar () const |
|
bool | matches (const char *, CaseSensitivity c=CaseSensitive) const |
|
| operator const char * () const |
|
bool | operator!= (const char *) const |
|
bool | operator!= (const String &) const |
|
template<class T > |
bool | operator!= (const T &t) const |
|
bool | operator< (const char *) const |
|
bool | operator< (const String &) const |
|
template<class T > |
bool | operator< (const T &) const |
|
bool | operator== (const char *) const |
|
bool | operator== (const String &) const |
|
template<class T > |
bool | operator== (const T &) const |
|
bool | operator> (const char *) const |
|
bool | operator> (const String &) const |
|
template<class T > |
bool | operator> (const T &) const |
|
const char & | operator[] (int idx) const |
|
unsigned int | size () const |
|
bool | startsWith (const char *, CaseSensitivity c=CaseSensitive) const |
|
const char * | str () const |
|
bool | toBool () const |
|
double | toDouble () const |
|
float | toFloat () const |
|
int | toInt () const |
|
uint64_t | toUInt64 () const |
|
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
The minimum buffer size makes life easier in worlds where strcpy etc. rule. Overhead is 4 extra bytes for variable length and 4 bytes for minimum length.
Constructing/asigning/comparing etc. with a (char*) null pointer is no problem.
Don't try to add constructors with a single basic type - this leads to nasty hidden bugs because the compiler will try to convert all kinds of things into BufferStrings. If you just need a string from an int, float, ..., just use str = toString( var ). If you need the BufferString later, use:
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
<>