|
| citem_cmt_t () |
| citem_cmt_t (const char *s) |
| _qstring (void) |
| Constructor.
|
| _qstring (const char *ptr) |
| Constructor - creates a new qstring from an existing char *.
|
| _qstring (const char *ptr, size_t len) |
| Constructor - creates a new qstring using first 'len' chars from 'ptr'.
|
| _qstring (size_t count, char 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< char > &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, char c) |
| Resize to the given size.
|
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 char * | 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 char *str) |
| Allow assignment of qstrings using '='.
|
_qstring & | operator= (const _qstring &qstr) |
_qstring & | operator= (_qstring &&x) noexcept |
| Move assignment operator.
|
_qstring & | operator+= (char 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 '+'.
|
| DECLARE_COMPARISONS (_qstring) |
bool | operator== (const char *r) const |
| Test equality of a qstring and a const char* using '=='.
|
bool | operator!= (const char *r) const |
| Test equality of a qstring and a const char* with '!='.
|
bool | operator< (const char *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 char *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 char *ptr, ssize_t len=-1) const |
const char & | operator[] (size_t idx) const |
| Retrieve char at index 'idx' using '[]'.
|
char & | operator[] (size_t idx) |
| Retrieve char at index 'idx' using '[]'.
|
const char & | at (size_t idx) const |
| Retrieve const char at index 'idx'.
|
char & | at (size_t idx) |
| Retrieve char at index 'idx'.
|
char * | extract (void) |
| Extract C string from _qstring. Must qfree() it.
|
void | inject (char *s, size_t len) |
| Assign this qstring to an existing char *.
|
void | inject (char *s) |
| Same as to inject(qchar *, size_t), with len = strlen(s)
|
char | last (void) const |
| Get the last qchar in the string (for concatenation checks)
|
size_t | find (const char *str, size_t pos=0) const |
| Find a substring.
|
bool | replace (const char *what, const char *with) |
| Replace all occurrences of 'what' with 'with'.
|
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 (char c, size_t pos=0) const |
| Find a character in the qstring.
|
size_t | rfind (char c, size_t pos=0) const |
| Search backwards for a character in the qstring.
|
_qstring< char > | substr (size_t pos=0, size_t n=npos) const |
| Get a substring.
|
_qstring & | remove (size_t idx, size_t cnt) |
| Remove characters from the qstring.
|
_qstring & | insert (size_t idx, char c) |
| Insert a character into the qstring.
|
_qstring & | insert (size_t idx, const char *str, size_t addlen) |
| Insert a string into the qstring.
|
_qstring & | insert (size_t idx, const char *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 (char c) |
| Prepend the qstring with 'c'.
|
_qstring & | insert (const char *str) |
| Prepend the qstring with 'str'.
|
_qstring & | insert (const _qstring &qstr) |
| Prepend the qstring with 'qstr'.
|
_qstring & | append (char c) |
| Append c to the end of the qstring.
|
_qstring & | append (const char *str, size_t addlen) |
| Append a string to the qstring.
|
_qstring & | append (const char *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.
|
| AS_PRINTF (2, 0) _qstring &cat_vsprnt(const char *format |
| Append result of qvsnprintf() to qstring.
|
| va_copy (copy, va) |
| if (add !=0) |
| va_end (copy) |
| AS_PRINTF (2, 0) _qstring &vsprnt(const char *format |
| Replace qstring with the result of qvsnprintf()
|
| va_copy (copy, va) |
body | clear () |
| if (add !=0) |
| va_end (copy) |
| AS_PRINTF (2, 3) _qstring &cat_sprnt(const char *format |
| Append result of qsnprintf() to qstring.
|
| va_start (va, format) |
| cat_vsprnt (format, va) |
| va_end (va) |
| AS_PRINTF (2, 3) _qstring &sprnt(const char *format |
| Replace qstring with the result of qsnprintf()
|
| va_start (va, format) |
| vsprnt (format, va) |
| va_end (va) |
| GCC_DIAG_OFF (format-nonliteral) |
| Replace qstring with the result of qsnprintf()
|
_qstring & | nowarn_sprnt (const char *format,...) |
| GCC_DIAG_ON (format-nonliteral) |
_qstring & | fill (size_t pos, char c, size_t len) |
| Fill qstring with a character.
|
_qstring & | fill (char c, size_t len) |
| Clear contents of qstring and fill with 'c'.
|
_qstring & | ltrim (char blank=' ') |
| Remove all instances of the specified char from the beginning of the qstring.
|
_qstring & | rtrim (char 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 (char blank=' ') |
| Remove all instances of the specified char from both ends of the qstring.
|
void | push_back (char c) |
void | split (qvector< _qstring< char > > *out, const char *sep, uint32 flags=0) const |
| Split a string on SEP, appending the parts to OUT.
|
Ctree item comment.
For each comment we remember its body and the fact of its retrieval