Merge "libutils: remove whitespaces in String16.cpp and String16.h"

This commit is contained in:
Samuel Tan 2016-02-17 00:33:31 +00:00 committed by Gerrit Code Review
commit 8c09555aac
2 changed files with 14 additions and 14 deletions

View file

@ -62,9 +62,9 @@ public:
explicit String16(const char* o, size_t len);
~String16();
inline const char16_t* string() const;
size_t size() const;
void setTo(const String16& other);
status_t setTo(const char16_t* other);
@ -72,12 +72,12 @@ public:
status_t setTo(const String16& other,
size_t len,
size_t begin=0);
status_t append(const String16& other);
status_t append(const char16_t* other, size_t len);
inline String16& operator=(const String16& other);
inline String16& operator+=(const String16& other);
inline String16 operator+(const String16& other) const;
@ -90,7 +90,7 @@ public:
bool startsWith(const String16& prefix) const;
bool startsWith(const char16_t* prefix) const;
status_t makeLower();
status_t replaceAll(char16_t replaceThis,
@ -106,16 +106,16 @@ public:
inline bool operator!=(const String16& other) const;
inline bool operator>=(const String16& other) const;
inline bool operator>(const String16& other) const;
inline bool operator<(const char16_t* other) const;
inline bool operator<=(const char16_t* other) const;
inline bool operator==(const char16_t* other) const;
inline bool operator!=(const char16_t* other) const;
inline bool operator>=(const char16_t* other) const;
inline bool operator>(const char16_t* other) const;
inline operator const char16_t*() const;
private:
const char16_t* mString;
};

View file

@ -77,7 +77,7 @@ static char16_t* allocFromUTF8(const char* u8str, size_t u8len)
//printf("Created UTF-16 string from UTF-8 \"%s\":", in);
//printHexData(1, str, buf->size(), 16, 1);
//printf("\n");
return u16str;
}
@ -127,7 +127,7 @@ String16::String16(const char16_t* o)
mString = str;
return;
}
mString = getEmptyString();
}
@ -142,7 +142,7 @@ String16::String16(const char16_t* o, size_t len)
mString = str;
return;
}
mString = getEmptyString();
}
@ -228,7 +228,7 @@ status_t String16::append(const String16& other)
} else if (otherLen == 0) {
return NO_ERROR;
}
SharedBuffer* buf = SharedBuffer::bufferFromData(mString)
->editResize((myLen+otherLen+1)*sizeof(char16_t));
if (buf) {
@ -249,7 +249,7 @@ status_t String16::append(const char16_t* chrs, size_t otherLen)
} else if (otherLen == 0) {
return NO_ERROR;
}
SharedBuffer* buf = SharedBuffer::bufferFromData(mString)
->editResize((myLen+otherLen+1)*sizeof(char16_t));
if (buf) {