summaryrefslogtreecommitdiff
path: root/deps/icu-small/source/common/unicode/unistr.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/icu-small/source/common/unicode/unistr.h')
-rw-r--r--deps/icu-small/source/common/unicode/unistr.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/deps/icu-small/source/common/unicode/unistr.h b/deps/icu-small/source/common/unicode/unistr.h
index bf00974fdd..6f62244a1e 100644
--- a/deps/icu-small/source/common/unicode/unistr.h
+++ b/deps/icu-small/source/common/unicode/unistr.h
@@ -1,3 +1,5 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
* Copyright (C) 1998-2016, International Business Machines
@@ -74,7 +76,9 @@ UStringCaseMapper(const UCaseMap *csm,
U_NAMESPACE_BEGIN
+#if !UCONFIG_NO_BREAK_ITERATION
class BreakIterator; // unicode/brkiter.h
+#endif
class Locale; // unicode/locid.h
class StringCharacterIterator;
class UnicodeStringAppendable; // unicode/appendable.h
@@ -172,8 +176,6 @@ class UnicodeStringAppendable; // unicode/appendable.h
# endif
#endif
-/* Cannot make the following #ifndef U_HIDE_DRAFT_API,
- it is used to construct other non-internal constants */
/**
* \def UNISTR_OBJECT_SIZE
* Desired sizeof(UnicodeString) in bytes.
@@ -205,7 +207,7 @@ class UnicodeStringAppendable; // unicode/appendable.h
* and the internal buffer would hold up to 11 UChars in that case.
*
* @see U16_MAX_LENGTH
- * @draft ICU 56
+ * @stable ICU 56
*/
#ifndef UNISTR_OBJECT_SIZE
# define UNISTR_OBJECT_SIZE 64
@@ -1902,7 +1904,6 @@ public:
*/
UnicodeString &fastCopyFrom(const UnicodeString &src);
-#ifndef U_HIDE_DRAFT_API
#if U_HAVE_RVALUE_REFERENCES
/**
* Move assignment operator, might leave src in bogus state.
@@ -1910,12 +1911,13 @@ public:
* The behavior is undefined if *this and src are the same object.
* @param src source string
* @return *this
- * @draft ICU 56
+ * @stable ICU 56
*/
UnicodeString &operator=(UnicodeString &&src) U_NOEXCEPT {
return moveFrom(src);
}
#endif
+ // do not use #ifndef U_HIDE_DRAFT_API for moveFrom, needed by non-draft API
/**
* Move assignment, might leave src in bogus state.
* This string will have the same contents and state that the source string had.
@@ -1931,16 +1933,15 @@ public:
/**
* Swap strings.
* @param other other string
- * @draft ICU 56
+ * @stable ICU 56
*/
void swap(UnicodeString &other) U_NOEXCEPT;
-#endif /* U_HIDE_DRAFT_API */
/**
* Non-member UnicodeString swap function.
* @param s1 will get s2's contents and state
* @param s2 will get s1's contents and state
- * @draft ICU 56
+ * @stable ICU 56
*/
friend U_COMMON_API inline void U_EXPORT2
swap(UnicodeString &s1, UnicodeString &s2) U_NOEXCEPT {
@@ -3212,17 +3213,15 @@ public:
*/
UnicodeString(const UnicodeString& that);
-#ifndef U_HIDE_DRAFT_API
#if U_HAVE_RVALUE_REFERENCES
/**
* Move constructor, might leave src in bogus state.
* This string will have the same contents and state that the source string had.
* @param src source string
- * @draft ICU 56
+ * @stable ICU 56
*/
UnicodeString(UnicodeString &&src) U_NOEXCEPT;
#endif
-#endif /* U_HIDE_DRAFT_API */
/**
* 'Substring' constructor from tail of source string.
@@ -3277,7 +3276,7 @@ public:
* @see toUTF8String
* @stable ICU 4.2
*/
- static UnicodeString fromUTF8(const StringPiece &utf8);
+ static UnicodeString fromUTF8(StringPiece utf8);
/**
* Create a UnicodeString from a UTF-32 string.
@@ -3392,7 +3391,7 @@ protected:
private:
// For char* constructors. Could be made public.
- UnicodeString &setToUTF8(const StringPiece &utf8);
+ UnicodeString &setToUTF8(StringPiece utf8);
// For extract(char*).
// We could make a toUTF8(target, capacity, errorCode) public but not
// this version: New API will be cleaner if we make callers create substrings
@@ -3617,7 +3616,6 @@ private:
*/
US_STACKBUF_SIZE=(int32_t)(UNISTR_OBJECT_SIZE-sizeof(void *)-2)/U_SIZEOF_UCHAR,
kInvalidUChar=0xffff, // U+FFFF returned by charAt(invalid index)
- kGrowSize=128, // grow size for this buffer
kInvalidHashCode=0, // invalid hash code
kEmptyHashCode=1, // hash code for empty string