]>
Commit | Line | Data |
---|---|---|
66f70487 LC |
1 | #ifndef QSTRING_H |
2 | #define QSTRING_H | |
3 | ||
764c1cae | 4 | #include <stdint.h> |
66f70487 LC |
5 | #include "qobject.h" |
6 | ||
7 | typedef struct QString { | |
8 | QObject_HEAD; | |
9 | char *string; | |
d30ec846 AL |
10 | size_t length; |
11 | size_t capacity; | |
66f70487 LC |
12 | } QString; |
13 | ||
d30ec846 | 14 | QString *qstring_new(void); |
66f70487 | 15 | QString *qstring_from_str(const char *str); |
4b5c5766 | 16 | QString *qstring_from_substr(const char *str, int start, int end); |
66f70487 | 17 | const char *qstring_get_str(const QString *qstring); |
764c1cae | 18 | void qstring_append_int(QString *qstring, int64_t value); |
d30ec846 | 19 | void qstring_append(QString *qstring, const char *str); |
6fe9565c | 20 | void qstring_append_chr(QString *qstring, int c); |
66f70487 LC |
21 | QString *qobject_to_qstring(const QObject *obj); |
22 | ||
23 | #endif /* QSTRING_H */ |