diff options
Diffstat (limited to 'include/utils/String8.h')
-rw-r--r-- | include/utils/String8.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/utils/String8.h b/include/utils/String8.h index ef0b51a..cef8eca 100644 --- a/include/utils/String8.h +++ b/include/utils/String8.h @@ -157,9 +157,12 @@ public: inline size_t size() const; inline size_t length() const; inline size_t bytes() const; + inline bool isEmpty() const; inline const SharedBuffer* sharedBuffer() const; + void clear(); + void setTo(const String8& other); status_t setTo(const char* other); status_t setTo(const char* other, size_t numChars); @@ -345,6 +348,11 @@ inline size_t String8::size() const return length(); } +inline bool String8::isEmpty() const +{ + return length() == 0; +} + inline size_t String8::bytes() const { return SharedBuffer::sizeFromData(mString)-1; |