|
| _qstring (void) |
| Constructor.
|
|
| _qstring (const qchar *ptr) |
| Constructor - creates a new qstring from an existing char *.
|
|
| _qstring (const qchar *ptr, size_t len) |
| Constructor - creates a new qstring using first 'len' chars from 'ptr'.
|
|
| _qstring (size_t count, qchar ch) |
| Constructor - constructs the string with 'count' copies of character 'ch'.
|
|
| _qstring (_qstring &&x) |
| Move constructor.
|
|
| _qstring (const _qstring &r) |
| Copy constructor (if not declared, move constructor causes it to be deleted)
|
|
void | swap (_qstring< qchar > &r) |
| Swap contents of two qstrings. see qvector::swap()
|
|
size_t | length (void) const |
| Get number of chars in this qstring (not including terminating zero)
|
|
size_t | size (void) const |
| Get number of chars in this qstring (including terminating zero)
|
|
size_t | capacity (void) const |
| Get number of chars this qstring can contain (including terminating zero)
|
|
void | resize (size_t s, qchar c) |
| Resize to the given size. More...
|
|
void | resize (size_t s) |
| Similar to resize(size_t, qchar) - but any extra space is filled with zeroes.
|
|
void | remove_last (int cnt=1) |
|
void | reserve (size_t cnt) |
| Increase capacity the qstring. see qvector::reserve()
|
|
void | clear (void) |
| Clear qstring and free memory.
|
|
void | qclear (void) |
| Clear qstring but do not free memory yet.
|
|
bool | empty (void) const |
| Does the qstring have 0 non-null elements?
|
|
const qchar * | c_str (void) const |
| Convert the qstring to a char *.
|
|
iterator | begin (void) |
| Get a pointer to the beginning of the qstring.
|
|
const_iterator | begin (void) const |
| Get a const pointer to the beginning of the qstring.
|
|
iterator | end (void) |
| Get a pointer to the end of the qstring (this is not the terminating zero)
|
|
const_iterator | end (void) const |
| Get a const pointer to the end of the qstring (this is not the terminating zero)
|
|
_qstring & | operator= (const qchar *str) |
| Allow assignment of qstrings using '='.
|
|
_qstring & | operator= (const _qstring &qstr) |
|
_qstring & | operator= (_qstring &&x) noexcept |
| Move assignment operator.
|
|
_qstring & | operator+= (qchar c) |
| Append a char using '+='.
|
|
_qstring & | operator+= (const _qstring &r) |
| Append another qstring using '+='.
|
|
_qstring | operator+ (const _qstring &r) const |
| Get result of appending two qstrings using '+'.
|
|
bool | operator== (const qchar *r) const |
| Test equality of a qstring and a const char* using '=='.
|
|
bool | operator!= (const qchar *r) const |
| Test equality of a qstring and a const char* with '!='.
|
|
bool | operator< (const qchar *r) const |
| Compare two qstrings using '<'. see qstrcmp()
|
|
bool | starts_with (const _qstring &str) const |
| Does the string start with the specified prefix?
|
|
bool | starts_with (const qchar *ptr, ssize_t len=-1) const |
|
bool | ends_with (const _qstring &str) const |
| Does the string end with the specified suffix?
|
|
bool | ends_with (const qchar *ptr, ssize_t len=-1) const |
|
const qchar & | operator[] (size_t idx) const |
| Retrieve char at index 'idx' using '[]'.
|
|
qchar & | operator[] (size_t idx) |
| Retrieve char at index 'idx' using '[]'.
|
|
const qchar & | at (size_t idx) const |
| Retrieve const char at index 'idx'.
|
|
qchar & | at (size_t idx) |
| Retrieve char at index 'idx'.
|
|
qchar * | extract (void) |
| Extract C string from _qstring. Must qfree() it.
|
|
void | inject (qchar *s, size_t len) |
| Assign this qstring to an existing char *. More...
|
|
void | inject (qchar *s) |
| Same as to inject(qchar *, size_t), with len = strlen(s)
|
|
qchar | last (void) const |
| Get the last qchar in the string (for concatenation checks)
|
|
size_t | find (const qchar *str, size_t pos=0) const |
| Find a substring. More...
|
|
bool | replace (const qchar *what, const qchar *with) |
| Replace all occurrences of 'what' with 'with'. More...
|
|
size_t | find (const _qstring &str, size_t pos=0) const |
| Same as find(const qchar *, size_t), but takes a qstring parameter.
|
|
size_t | find (qchar c, size_t pos=0) const |
| Find a character in the qstring. More...
|
|
size_t | rfind (qchar c, size_t pos=0) const |
| Search backwards for a character in the qstring. More...
|
|
_qstring< qchar > | substr (size_t pos=0, size_t n=npos) const |
| Get a substring. More...
|
|
_qstring & | remove (size_t idx, size_t cnt) |
| Remove characters from the qstring. More...
|
|
_qstring & | insert (size_t idx, qchar c) |
| Insert a character into the qstring. More...
|
|
_qstring & | insert (size_t idx, const qchar *str, size_t addlen) |
| Insert a string into the qstring. More...
|
|
_qstring & | insert (size_t idx, const qchar *str) |
| Same as insert(size_t, const qchar *, size_t), but all chars in str are inserted.
|
|
_qstring & | insert (size_t idx, const _qstring &qstr) |
| Same as insert(size_t, const qchar *), but takes a qstring parameter.
|
|
_qstring & | insert (qchar c) |
| Prepend the qstring with 'c'.
|
|
_qstring & | insert (const qchar *str) |
| Prepend the qstring with 'str'.
|
|
_qstring & | insert (const _qstring &qstr) |
| Prepend the qstring with 'qstr'.
|
|
_qstring & | append (qchar c) |
| Append c to the end of the qstring.
|
|
_qstring & | append (const qchar *str, size_t addlen) |
| Append a string to the qstring. More...
|
|
_qstring & | append (const qchar *str) |
| Same as append(const qchar *, size_t), but all chars in 'str' are appended.
|
|
_qstring & | append (const _qstring &qstr) |
| Same as append(const qchar *), but takes a qstring argument.
|
|
_qstring & | cat_vsprnt (const char *format, va_list va) |
| Append result of qvsnprintf() to qstring.
|
|
_qstring & | vsprnt (const char *format, va_list va) |
| Replace qstring with the result of qvsnprintf()
|
|
_qstring & | cat_sprnt (const char *format,...) |
| Append result of qsnprintf() to qstring.
|
|
_qstring & | sprnt (const char *format,...) |
| Replace qstring with the result of qsnprintf()
|
|
| GCC_DIAG_OFF (format-nonliteral) |
| Replace qstring with the result of qsnprintf() More...
|
|
_qstring & | nowarn_sprnt (const char *format,...) |
|
| GCC_DIAG_ON (format-nonliteral) |
|
_qstring & | fill (size_t pos, qchar c, size_t len) |
| Fill qstring with a character. More...
|
|
_qstring & | fill (qchar c, size_t len) |
| Clear contents of qstring and fill with 'c'.
|
|
_qstring & | ltrim (qchar blank=' ') |
| Remove all instances of the specified char from the beginning of the qstring.
|
|
_qstring & | rtrim (qchar blank, size_t minlen=0) |
| Remove all instances of the specified char from the end of the qstring.
|
|
_qstring & | rtrim () |
| Remove all whitespace from the end of the qstring.
|
|
_qstring & | trim2 (qchar blank=' ') |
| Remove all instances of the specified char from both ends of the qstring.
|
|
void | split (qvector< _qstring< qchar > > *out, const qchar *sep, uint32 flags=0) const |
| Split a string on SEP, appending the parts to OUT. More...
|
|
template<class qchar>
class _qstring< qchar >
Reimplementation of the string class from STL.
Only the most essential functions are implemented. The reason why we have this is because it is not compiler dependent (hopefully) and therefore can be used in IDA API