diff options
author | mcheshkov <mcheshkov@yandex-team.ru> | 2022-02-10 16:46:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:15 +0300 |
commit | e9d19cec64684c9c1e6b0c98297e5b895cf904fe (patch) | |
tree | 2768b1223e96a8a0610a93d18425d9647c1123c8 /contrib/libs/icu/common/charstr.h | |
parent | 60040c91ffe701a84689b2c6310ff845e65cff42 (diff) | |
download | ydb-e9d19cec64684c9c1e6b0c98297e5b895cf904fe.tar.gz |
Restoring authorship annotation for <mcheshkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/icu/common/charstr.h')
-rw-r--r-- | contrib/libs/icu/common/charstr.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/contrib/libs/icu/common/charstr.h b/contrib/libs/icu/common/charstr.h index 23b950ed6e..818f6a997a 100644 --- a/contrib/libs/icu/common/charstr.h +++ b/contrib/libs/icu/common/charstr.h @@ -1,4 +1,4 @@ -// © 2016 and later: Unicode, Inc. and others. +// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ********************************************************************** @@ -56,18 +56,18 @@ public: ~CharString() {} /** - * Move constructor; might leave src in an undefined state. - * This string will have the same contents and state that the source string had. - */ - CharString(CharString &&src) U_NOEXCEPT; - /** - * Move assignment operator; might leave src in an undefined state. - * This string will have the same contents and state that the source string had. - * The behavior is undefined if *this and src are the same object. - */ - CharString &operator=(CharString &&src) U_NOEXCEPT; - - /** + * Move constructor; might leave src in an undefined state. + * This string will have the same contents and state that the source string had. + */ + CharString(CharString &&src) U_NOEXCEPT; + /** + * Move assignment operator; might leave src in an undefined state. + * This string will have the same contents and state that the source string had. + * The behavior is undefined if *this and src are the same object. + */ + CharString &operator=(CharString &&src) U_NOEXCEPT; + + /** * Replaces this string's contents with the other string's contents. * CharString does not support the standard copy constructor nor * the assignment operator, to make copies explicit and to @@ -82,24 +82,24 @@ public: const char *data() const { return buffer.getAlias(); } char *data() { return buffer.getAlias(); } - /** - * Allocates length()+1 chars and copies the NUL-terminated data(). - * The caller must uprv_free() the result. - */ - char *cloneData(UErrorCode &errorCode) const; - - bool operator==(StringPiece other) const { - return len == other.length() && (len == 0 || uprv_memcmp(data(), other.data(), len) == 0); - } - bool operator!=(StringPiece other) const { - return !operator==(other); - } - + /** + * Allocates length()+1 chars and copies the NUL-terminated data(). + * The caller must uprv_free() the result. + */ + char *cloneData(UErrorCode &errorCode) const; + + bool operator==(StringPiece other) const { + return len == other.length() && (len == 0 || uprv_memcmp(data(), other.data(), len) == 0); + } + bool operator!=(StringPiece other) const { + return !operator==(other); + } + /** @return last index of c, or -1 if c is not in this string */ int32_t lastIndexOf(char c) const; - bool contains(StringPiece s) const; - + bool contains(StringPiece s) const; + CharString &clear() { len=0; buffer[0]=0; return *this; } CharString &truncate(int32_t newLength); @@ -137,7 +137,7 @@ public: UErrorCode &errorCode); CharString &appendInvariantChars(const UnicodeString &s, UErrorCode &errorCode); - CharString &appendInvariantChars(const UChar* uchars, int32_t ucharsLen, UErrorCode& errorCode); + CharString &appendInvariantChars(const UChar* uchars, int32_t ucharsLen, UErrorCode& errorCode); /** * Appends a filename/path part, e.g., a directory name. |