This is a string holding UTF-8 characters. Does not allow the value more than 0x10FFFF, which is not valid unicode codepoint.
| 47 | //! This is a string holding UTF-8 characters. Does not allow the value more |
| 48 | // than 0x10FFFF, which is not valid unicode codepoint. |
| 49 | class String8 |
| 50 | { |
| 51 | public: |
| 52 | String8(); |
| 53 | String8(const String8& o); |
| 54 | explicit String8(const char* o); |
| 55 | explicit String8(const char* o, size_t numChars); |
| 56 | |
| 57 | explicit String8(const String16& o); |
| 58 | explicit String8(const char16_t* o); |
| 59 | explicit String8(const char16_t* o, size_t numChars); |
| 60 | explicit String8(const char32_t* o); |
| 61 | explicit String8(const char32_t* o, size_t numChars); |
| 62 | ~String8(); |
| 63 | |
| 64 | static String8 format(const char* fmt, ...) __attribute__((format (printf, 1, 2))); |
| 65 | static String8 formatV(const char* fmt, va_list args); |
| 66 | |
| 67 | inline const char* c_str() const; |
| 68 | |
| 69 | inline size_t size() const; |
| 70 | inline size_t bytes() const; |
| 71 | inline bool empty() const; |
| 72 | |
| 73 | size_t length() const; |
| 74 | |
| 75 | void clear(); |
| 76 | |
| 77 | void setTo(const String8& other); |
| 78 | status_t setTo(const char* other); |
| 79 | status_t setTo(const char* other, size_t numChars); |
| 80 | status_t setTo(const char16_t* other, size_t numChars); |
| 81 | status_t setTo(const char32_t* other, |
| 82 | size_t length); |
| 83 | |
| 84 | status_t append(const String8& other); |
| 85 | status_t append(const char* other); |
| 86 | status_t append(const char* other, size_t numChars); |
| 87 | |
| 88 | status_t appendFormat(const char* fmt, ...) |
| 89 | __attribute__((format (printf, 2, 3))); |
| 90 | status_t appendFormatV(const char* fmt, va_list args); |
| 91 | |
| 92 | inline String8& operator=(const String8& other); |
| 93 | inline String8& operator=(const char* other); |
| 94 | |
| 95 | inline String8& operator+=(const String8& other); |
| 96 | inline String8 operator+(const String8& other) const; |
| 97 | |
| 98 | inline String8& operator+=(const char* other); |
| 99 | inline String8 operator+(const char* other) const; |
| 100 | |
| 101 | inline int compare(const String8& other) const; |
| 102 | |
| 103 | inline bool operator<(const String8& other) const; |
| 104 | inline bool operator<=(const String8& other) const; |
| 105 | inline bool operator==(const String8& other) const; |
| 106 | inline bool operator!=(const String8& other) const; |
no outgoing calls
no test coverage detected