ICU-12604 BreakIterator, clarify that setText() retains a reference to the supplied text.

X-SVN-Rev: 39143
This commit is contained in:
Andy Heninger 2016-09-07 00:41:57 +00:00
parent c1c6c1c2a2
commit 4d2040a23b
3 changed files with 16 additions and 2 deletions

View File

@ -170,6 +170,11 @@ public:
/**
* Change the text over which this operates. The text boundary is
* reset to the start.
*
* The BreakIterator will retain a reference to the supplied string.
* The caller must not modify or delete the text while the BreakIterator
* retains the reference.
*
* @param text The UnicodeString used to change the text.
* @stable ICU 2.0
*/

View File

@ -375,6 +375,11 @@ public:
/**
* Set the iterator to analyze a new piece of text. This function resets
* the current iteration position to the beginning of the text.
*
* The BreakIterator will retain a reference to the supplied string.
* The caller must not modify or delete the text while the BreakIterator
* retains the reference.
*
* @param newText The text to analyze.
* @stable ICU 2.0
*/

View File

@ -72,7 +72,7 @@
* "Extended Grapheme Clusters", which are groupings of codepoints
* that should be treated as character-like units for many text operations.
* Please see Unicode Standard Annex #29, Unicode Text Segmentation,
* http://www.unicode.org/reports/tr29/ for additional information
* http://www.unicode.org/reports/tr29/ for additional information
* on grapheme clusters and guidelines on their use.
* <p>
* Title boundary analysis locates all positions,
@ -318,7 +318,11 @@ U_NAMESPACE_END
#endif
/**
* Sets an existing iterator to point to a new piece of text
* Sets an existing iterator to point to a new piece of text.
* The break iterator retains a pointer to the supplied text.
* The caller must not modify or delete the text while the BreakIterator
* retains the reference.
*
* @param bi The iterator to use
* @param text The text to be set
* @param textLength The length of the text