1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/common/unicode/ubrk.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,541 @@ 1.4 +/* 1.5 +****************************************************************************** 1.6 +* Copyright (C) 1996-2013, International Business Machines Corporation and others. 1.7 +* All Rights Reserved. 1.8 +****************************************************************************** 1.9 +*/ 1.10 + 1.11 +#ifndef UBRK_H 1.12 +#define UBRK_H 1.13 + 1.14 +#include "unicode/utypes.h" 1.15 +#include "unicode/uloc.h" 1.16 +#include "unicode/utext.h" 1.17 +#include "unicode/localpointer.h" 1.18 + 1.19 +/** 1.20 + * A text-break iterator. 1.21 + * For usage in C programs. 1.22 + */ 1.23 +#ifndef UBRK_TYPEDEF_UBREAK_ITERATOR 1.24 +# define UBRK_TYPEDEF_UBREAK_ITERATOR 1.25 + /** 1.26 + * Opaque type representing an ICU Break iterator object. 1.27 + * @stable ICU 2.0 1.28 + */ 1.29 + typedef struct UBreakIterator UBreakIterator; 1.30 +#endif 1.31 + 1.32 +#if !UCONFIG_NO_BREAK_ITERATION 1.33 + 1.34 +#include "unicode/parseerr.h" 1.35 + 1.36 +/** 1.37 + * \file 1.38 + * \brief C API: BreakIterator 1.39 + * 1.40 + * <h2> BreakIterator C API </h2> 1.41 + * 1.42 + * The BreakIterator C API defines methods for finding the location 1.43 + * of boundaries in text. Pointer to a UBreakIterator maintain a 1.44 + * current position and scan over text returning the index of characters 1.45 + * where boundaries occur. 1.46 + * <p> 1.47 + * Line boundary analysis determines where a text string can be broken 1.48 + * when line-wrapping. The mechanism correctly handles punctuation and 1.49 + * hyphenated words. 1.50 + * <p> 1.51 + * Sentence boundary analysis allows selection with correct 1.52 + * interpretation of periods within numbers and abbreviations, and 1.53 + * trailing punctuation marks such as quotation marks and parentheses. 1.54 + * <p> 1.55 + * Word boundary analysis is used by search and replace functions, as 1.56 + * well as within text editing applications that allow the user to 1.57 + * select words with a double click. Word selection provides correct 1.58 + * interpretation of punctuation marks within and following 1.59 + * words. Characters that are not part of a word, such as symbols or 1.60 + * punctuation marks, have word-breaks on both sides. 1.61 + * <p> 1.62 + * Character boundary analysis identifies the boundaries of 1.63 + * "Extended Grapheme Clusters", which are groupings of codepoints 1.64 + * that should be treated as character-like units for many text operations. 1.65 + * Please see Unicode Standard Annex #29, Unicode Text Segmentation, 1.66 + * http://www.unicode.org/reports/tr29/ for additional information 1.67 + * on grapheme clusters and guidelines on their use. 1.68 + * <p> 1.69 + * Title boundary analysis locates all positions, 1.70 + * typically starts of words, that should be set to Title Case 1.71 + * when title casing the text. 1.72 + * <p> 1.73 + * The text boundary positions are found according to the rules 1.74 + * described in Unicode Standard Annex #29, Text Boundaries, and 1.75 + * Unicode Standard Annex #14, Line Breaking Properties. These 1.76 + * are available at http://www.unicode.org/reports/tr14/ and 1.77 + * http://www.unicode.org/reports/tr29/. 1.78 + * <p> 1.79 + * In addition to the plain C API defined in this header file, an 1.80 + * object oriented C++ API with equivalent functionality is defined in the 1.81 + * file brkiter.h. 1.82 + * <p> 1.83 + * Code snippets illustrating the use of the Break Iterator APIs 1.84 + * are available in the ICU User Guide, 1.85 + * http://icu-project.org/userguide/boundaryAnalysis.html 1.86 + * and in the sample program icu/source/samples/break/break.cpp 1.87 + */ 1.88 + 1.89 +/** The possible types of text boundaries. @stable ICU 2.0 */ 1.90 +typedef enum UBreakIteratorType { 1.91 + /** Character breaks @stable ICU 2.0 */ 1.92 + UBRK_CHARACTER = 0, 1.93 + /** Word breaks @stable ICU 2.0 */ 1.94 + UBRK_WORD = 1, 1.95 + /** Line breaks @stable ICU 2.0 */ 1.96 + UBRK_LINE = 2, 1.97 + /** Sentence breaks @stable ICU 2.0 */ 1.98 + UBRK_SENTENCE = 3, 1.99 + 1.100 +#ifndef U_HIDE_DEPRECATED_API 1.101 + /** 1.102 + * Title Case breaks 1.103 + * The iterator created using this type locates title boundaries as described for 1.104 + * Unicode 3.2 only. For Unicode 4.0 and above title boundary iteration, 1.105 + * please use Word Boundary iterator. 1.106 + * 1.107 + * @deprecated ICU 2.8 Use the word break iterator for titlecasing for Unicode 4 and later. 1.108 + */ 1.109 + UBRK_TITLE = 4, 1.110 +#endif /* U_HIDE_DEPRECATED_API */ 1.111 + UBRK_COUNT = 5 1.112 +} UBreakIteratorType; 1.113 + 1.114 +/** Value indicating all text boundaries have been returned. 1.115 + * @stable ICU 2.0 1.116 + */ 1.117 +#define UBRK_DONE ((int32_t) -1) 1.118 + 1.119 + 1.120 +/** 1.121 + * Enum constants for the word break tags returned by 1.122 + * getRuleStatus(). A range of values is defined for each category of 1.123 + * word, to allow for further subdivisions of a category in future releases. 1.124 + * Applications should check for tag values falling within the range, rather 1.125 + * than for single individual values. 1.126 + * @stable ICU 2.2 1.127 +*/ 1.128 +typedef enum UWordBreak { 1.129 + /** Tag value for "words" that do not fit into any of other categories. 1.130 + * Includes spaces and most punctuation. */ 1.131 + UBRK_WORD_NONE = 0, 1.132 + /** Upper bound for tags for uncategorized words. */ 1.133 + UBRK_WORD_NONE_LIMIT = 100, 1.134 + /** Tag value for words that appear to be numbers, lower limit. */ 1.135 + UBRK_WORD_NUMBER = 100, 1.136 + /** Tag value for words that appear to be numbers, upper limit. */ 1.137 + UBRK_WORD_NUMBER_LIMIT = 200, 1.138 + /** Tag value for words that contain letters, excluding 1.139 + * hiragana, katakana or ideographic characters, lower limit. */ 1.140 + UBRK_WORD_LETTER = 200, 1.141 + /** Tag value for words containing letters, upper limit */ 1.142 + UBRK_WORD_LETTER_LIMIT = 300, 1.143 + /** Tag value for words containing kana characters, lower limit */ 1.144 + UBRK_WORD_KANA = 300, 1.145 + /** Tag value for words containing kana characters, upper limit */ 1.146 + UBRK_WORD_KANA_LIMIT = 400, 1.147 + /** Tag value for words containing ideographic characters, lower limit */ 1.148 + UBRK_WORD_IDEO = 400, 1.149 + /** Tag value for words containing ideographic characters, upper limit */ 1.150 + UBRK_WORD_IDEO_LIMIT = 500 1.151 +} UWordBreak; 1.152 + 1.153 +/** 1.154 + * Enum constants for the line break tags returned by getRuleStatus(). 1.155 + * A range of values is defined for each category of 1.156 + * word, to allow for further subdivisions of a category in future releases. 1.157 + * Applications should check for tag values falling within the range, rather 1.158 + * than for single individual values. 1.159 + * @stable ICU 2.8 1.160 +*/ 1.161 +typedef enum ULineBreakTag { 1.162 + /** Tag value for soft line breaks, positions at which a line break 1.163 + * is acceptable but not required */ 1.164 + UBRK_LINE_SOFT = 0, 1.165 + /** Upper bound for soft line breaks. */ 1.166 + UBRK_LINE_SOFT_LIMIT = 100, 1.167 + /** Tag value for a hard, or mandatory line break */ 1.168 + UBRK_LINE_HARD = 100, 1.169 + /** Upper bound for hard line breaks. */ 1.170 + UBRK_LINE_HARD_LIMIT = 200 1.171 +} ULineBreakTag; 1.172 + 1.173 + 1.174 + 1.175 +/** 1.176 + * Enum constants for the sentence break tags returned by getRuleStatus(). 1.177 + * A range of values is defined for each category of 1.178 + * sentence, to allow for further subdivisions of a category in future releases. 1.179 + * Applications should check for tag values falling within the range, rather 1.180 + * than for single individual values. 1.181 + * @stable ICU 2.8 1.182 +*/ 1.183 +typedef enum USentenceBreakTag { 1.184 + /** Tag value for for sentences ending with a sentence terminator 1.185 + * ('.', '?', '!', etc.) character, possibly followed by a 1.186 + * hard separator (CR, LF, PS, etc.) 1.187 + */ 1.188 + UBRK_SENTENCE_TERM = 0, 1.189 + /** Upper bound for tags for sentences ended by sentence terminators. */ 1.190 + UBRK_SENTENCE_TERM_LIMIT = 100, 1.191 + /** Tag value for for sentences that do not contain an ending 1.192 + * sentence terminator ('.', '?', '!', etc.) character, but 1.193 + * are ended only by a hard separator (CR, LF, PS, etc.) or end of input. 1.194 + */ 1.195 + UBRK_SENTENCE_SEP = 100, 1.196 + /** Upper bound for tags for sentences ended by a separator. */ 1.197 + UBRK_SENTENCE_SEP_LIMIT = 200 1.198 + /** Tag value for a hard, or mandatory line break */ 1.199 +} USentenceBreakTag; 1.200 + 1.201 + 1.202 +/** 1.203 + * Open a new UBreakIterator for locating text boundaries for a specified locale. 1.204 + * A UBreakIterator may be used for detecting character, line, word, 1.205 + * and sentence breaks in text. 1.206 + * @param type The type of UBreakIterator to open: one of UBRK_CHARACTER, UBRK_WORD, 1.207 + * UBRK_LINE, UBRK_SENTENCE 1.208 + * @param locale The locale specifying the text-breaking conventions. 1.209 + * @param text The text to be iterated over. 1.210 + * @param textLength The number of characters in text, or -1 if null-terminated. 1.211 + * @param status A UErrorCode to receive any errors. 1.212 + * @return A UBreakIterator for the specified locale. 1.213 + * @see ubrk_openRules 1.214 + * @stable ICU 2.0 1.215 + */ 1.216 +U_STABLE UBreakIterator* U_EXPORT2 1.217 +ubrk_open(UBreakIteratorType type, 1.218 + const char *locale, 1.219 + const UChar *text, 1.220 + int32_t textLength, 1.221 + UErrorCode *status); 1.222 + 1.223 +/** 1.224 + * Open a new UBreakIterator for locating text boundaries using specified breaking rules. 1.225 + * The rule syntax is ... (TBD) 1.226 + * @param rules A set of rules specifying the text breaking conventions. 1.227 + * @param rulesLength The number of characters in rules, or -1 if null-terminated. 1.228 + * @param text The text to be iterated over. May be null, in which case ubrk_setText() is 1.229 + * used to specify the text to be iterated. 1.230 + * @param textLength The number of characters in text, or -1 if null-terminated. 1.231 + * @param parseErr Receives position and context information for any syntax errors 1.232 + * detected while parsing the rules. 1.233 + * @param status A UErrorCode to receive any errors. 1.234 + * @return A UBreakIterator for the specified rules. 1.235 + * @see ubrk_open 1.236 + * @stable ICU 2.2 1.237 + */ 1.238 +U_STABLE UBreakIterator* U_EXPORT2 1.239 +ubrk_openRules(const UChar *rules, 1.240 + int32_t rulesLength, 1.241 + const UChar *text, 1.242 + int32_t textLength, 1.243 + UParseError *parseErr, 1.244 + UErrorCode *status); 1.245 + 1.246 +/** 1.247 + * Thread safe cloning operation 1.248 + * @param bi iterator to be cloned 1.249 + * @param stackBuffer <em>Deprecated functionality as of ICU 52, use NULL.</em><br> 1.250 + * user allocated space for the new clone. If NULL new memory will be allocated. 1.251 + * If buffer is not large enough, new memory will be allocated. 1.252 + * Clients can use the U_BRK_SAFECLONE_BUFFERSIZE. 1.253 + * @param pBufferSize <em>Deprecated functionality as of ICU 52, use NULL or 1.</em><br> 1.254 + * pointer to size of allocated space. 1.255 + * If *pBufferSize == 0, a sufficient size for use in cloning will 1.256 + * be returned ('pre-flighting') 1.257 + * If *pBufferSize is not enough for a stack-based safe clone, 1.258 + * new memory will be allocated. 1.259 + * @param status to indicate whether the operation went on smoothly or there were errors 1.260 + * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any allocations were necessary. 1.261 + * @return pointer to the new clone 1.262 + * @stable ICU 2.0 1.263 + */ 1.264 +U_STABLE UBreakIterator * U_EXPORT2 1.265 +ubrk_safeClone( 1.266 + const UBreakIterator *bi, 1.267 + void *stackBuffer, 1.268 + int32_t *pBufferSize, 1.269 + UErrorCode *status); 1.270 + 1.271 +#ifndef U_HIDE_DEPRECATED_API 1.272 + 1.273 +/** 1.274 + * A recommended size (in bytes) for the memory buffer to be passed to ubrk_saveClone(). 1.275 + * @deprecated ICU 52. Do not rely on ubrk_safeClone() cloning into any provided buffer. 1.276 + */ 1.277 +#define U_BRK_SAFECLONE_BUFFERSIZE 1 1.278 + 1.279 +#endif /* U_HIDE_DEPRECATED_API */ 1.280 + 1.281 +/** 1.282 +* Close a UBreakIterator. 1.283 +* Once closed, a UBreakIterator may no longer be used. 1.284 +* @param bi The break iterator to close. 1.285 + * @stable ICU 2.0 1.286 +*/ 1.287 +U_STABLE void U_EXPORT2 1.288 +ubrk_close(UBreakIterator *bi); 1.289 + 1.290 +#if U_SHOW_CPLUSPLUS_API 1.291 + 1.292 +U_NAMESPACE_BEGIN 1.293 + 1.294 +/** 1.295 + * \class LocalUBreakIteratorPointer 1.296 + * "Smart pointer" class, closes a UBreakIterator via ubrk_close(). 1.297 + * For most methods see the LocalPointerBase base class. 1.298 + * 1.299 + * @see LocalPointerBase 1.300 + * @see LocalPointer 1.301 + * @stable ICU 4.4 1.302 + */ 1.303 +U_DEFINE_LOCAL_OPEN_POINTER(LocalUBreakIteratorPointer, UBreakIterator, ubrk_close); 1.304 + 1.305 +U_NAMESPACE_END 1.306 + 1.307 +#endif 1.308 + 1.309 +/** 1.310 + * Sets an existing iterator to point to a new piece of text 1.311 + * @param bi The iterator to use 1.312 + * @param text The text to be set 1.313 + * @param textLength The length of the text 1.314 + * @param status The error code 1.315 + * @stable ICU 2.0 1.316 + */ 1.317 +U_STABLE void U_EXPORT2 1.318 +ubrk_setText(UBreakIterator* bi, 1.319 + const UChar* text, 1.320 + int32_t textLength, 1.321 + UErrorCode* status); 1.322 + 1.323 + 1.324 +/** 1.325 + * Sets an existing iterator to point to a new piece of text. 1.326 + * 1.327 + * All index positions returned by break iterator functions are 1.328 + * native indices from the UText. For example, when breaking UTF-8 1.329 + * encoded text, the break positions returned by \ref ubrk_next, \ref ubrk_previous, etc. 1.330 + * will be UTF-8 string indices, not UTF-16 positions. 1.331 + * 1.332 + * @param bi The iterator to use 1.333 + * @param text The text to be set. 1.334 + * This function makes a shallow clone of the supplied UText. This means 1.335 + * that the caller is free to immediately close or otherwise reuse the 1.336 + * UText that was passed as a parameter, but that the underlying text itself 1.337 + * must not be altered while being referenced by the break iterator. 1.338 + * @param status The error code 1.339 + * @stable ICU 3.4 1.340 + */ 1.341 +U_STABLE void U_EXPORT2 1.342 +ubrk_setUText(UBreakIterator* bi, 1.343 + UText* text, 1.344 + UErrorCode* status); 1.345 + 1.346 + 1.347 + 1.348 +/** 1.349 + * Determine the most recently-returned text boundary. 1.350 + * 1.351 + * @param bi The break iterator to use. 1.352 + * @return The character index most recently returned by \ref ubrk_next, \ref ubrk_previous, 1.353 + * \ref ubrk_first, or \ref ubrk_last. 1.354 + * @stable ICU 2.0 1.355 + */ 1.356 +U_STABLE int32_t U_EXPORT2 1.357 +ubrk_current(const UBreakIterator *bi); 1.358 + 1.359 +/** 1.360 + * Advance the iterator to the boundary following the current boundary. 1.361 + * 1.362 + * @param bi The break iterator to use. 1.363 + * @return The character index of the next text boundary, or UBRK_DONE 1.364 + * if all text boundaries have been returned. 1.365 + * @see ubrk_previous 1.366 + * @stable ICU 2.0 1.367 + */ 1.368 +U_STABLE int32_t U_EXPORT2 1.369 +ubrk_next(UBreakIterator *bi); 1.370 + 1.371 +/** 1.372 + * Set the iterator position to the boundary preceding the current boundary. 1.373 + * 1.374 + * @param bi The break iterator to use. 1.375 + * @return The character index of the preceding text boundary, or UBRK_DONE 1.376 + * if all text boundaries have been returned. 1.377 + * @see ubrk_next 1.378 + * @stable ICU 2.0 1.379 + */ 1.380 +U_STABLE int32_t U_EXPORT2 1.381 +ubrk_previous(UBreakIterator *bi); 1.382 + 1.383 +/** 1.384 + * Set the iterator position to the index of the first character in the text being scanned. 1.385 + * This is not always the same as index 0 of the text. 1.386 + * @param bi The break iterator to use. 1.387 + * @return The character index of the first character in the text being scanned. 1.388 + * @see ubrk_last 1.389 + * @stable ICU 2.0 1.390 + */ 1.391 +U_STABLE int32_t U_EXPORT2 1.392 +ubrk_first(UBreakIterator *bi); 1.393 + 1.394 +/** 1.395 + * Set the iterator position to the index immediately <EM>beyond</EM> the last character in the text being scanned. 1.396 + * This is not the same as the last character. 1.397 + * @param bi The break iterator to use. 1.398 + * @return The character offset immediately <EM>beyond</EM> the last character in the 1.399 + * text being scanned. 1.400 + * @see ubrk_first 1.401 + * @stable ICU 2.0 1.402 + */ 1.403 +U_STABLE int32_t U_EXPORT2 1.404 +ubrk_last(UBreakIterator *bi); 1.405 + 1.406 +/** 1.407 + * Set the iterator position to the first boundary preceding the specified offset. 1.408 + * The new position is always smaller than offset, or UBRK_DONE. 1.409 + * @param bi The break iterator to use. 1.410 + * @param offset The offset to begin scanning. 1.411 + * @return The text boundary preceding offset, or UBRK_DONE. 1.412 + * @see ubrk_following 1.413 + * @stable ICU 2.0 1.414 + */ 1.415 +U_STABLE int32_t U_EXPORT2 1.416 +ubrk_preceding(UBreakIterator *bi, 1.417 + int32_t offset); 1.418 + 1.419 +/** 1.420 + * Advance the iterator to the first boundary following the specified offset. 1.421 + * The value returned is always greater than offset, or UBRK_DONE. 1.422 + * @param bi The break iterator to use. 1.423 + * @param offset The offset to begin scanning. 1.424 + * @return The text boundary following offset, or UBRK_DONE. 1.425 + * @see ubrk_preceding 1.426 + * @stable ICU 2.0 1.427 + */ 1.428 +U_STABLE int32_t U_EXPORT2 1.429 +ubrk_following(UBreakIterator *bi, 1.430 + int32_t offset); 1.431 + 1.432 +/** 1.433 +* Get a locale for which text breaking information is available. 1.434 +* A UBreakIterator in a locale returned by this function will perform the correct 1.435 +* text breaking for the locale. 1.436 +* @param index The index of the desired locale. 1.437 +* @return A locale for which number text breaking information is available, or 0 if none. 1.438 +* @see ubrk_countAvailable 1.439 +* @stable ICU 2.0 1.440 +*/ 1.441 +U_STABLE const char* U_EXPORT2 1.442 +ubrk_getAvailable(int32_t index); 1.443 + 1.444 +/** 1.445 +* Determine how many locales have text breaking information available. 1.446 +* This function is most useful as determining the loop ending condition for 1.447 +* calls to \ref ubrk_getAvailable. 1.448 +* @return The number of locales for which text breaking information is available. 1.449 +* @see ubrk_getAvailable 1.450 +* @stable ICU 2.0 1.451 +*/ 1.452 +U_STABLE int32_t U_EXPORT2 1.453 +ubrk_countAvailable(void); 1.454 + 1.455 + 1.456 +/** 1.457 +* Returns true if the specfied position is a boundary position. As a side 1.458 +* effect, leaves the iterator pointing to the first boundary position at 1.459 +* or after "offset". 1.460 +* @param bi The break iterator to use. 1.461 +* @param offset the offset to check. 1.462 +* @return True if "offset" is a boundary position. 1.463 +* @stable ICU 2.0 1.464 +*/ 1.465 +U_STABLE UBool U_EXPORT2 1.466 +ubrk_isBoundary(UBreakIterator *bi, int32_t offset); 1.467 + 1.468 +/** 1.469 + * Return the status from the break rule that determined the most recently 1.470 + * returned break position. The values appear in the rule source 1.471 + * within brackets, {123}, for example. For rules that do not specify a 1.472 + * status, a default value of 0 is returned. 1.473 + * <p> 1.474 + * For word break iterators, the possible values are defined in enum UWordBreak. 1.475 + * @stable ICU 2.2 1.476 + */ 1.477 +U_STABLE int32_t U_EXPORT2 1.478 +ubrk_getRuleStatus(UBreakIterator *bi); 1.479 + 1.480 +/** 1.481 + * Get the statuses from the break rules that determined the most recently 1.482 + * returned break position. The values appear in the rule source 1.483 + * within brackets, {123}, for example. The default status value for rules 1.484 + * that do not explicitly provide one is zero. 1.485 + * <p> 1.486 + * For word break iterators, the possible values are defined in enum UWordBreak. 1.487 + * @param bi The break iterator to use 1.488 + * @param fillInVec an array to be filled in with the status values. 1.489 + * @param capacity the length of the supplied vector. A length of zero causes 1.490 + * the function to return the number of status values, in the 1.491 + * normal way, without attemtping to store any values. 1.492 + * @param status receives error codes. 1.493 + * @return The number of rule status values from rules that determined 1.494 + * the most recent boundary returned by the break iterator. 1.495 + * @stable ICU 3.0 1.496 + */ 1.497 +U_STABLE int32_t U_EXPORT2 1.498 +ubrk_getRuleStatusVec(UBreakIterator *bi, int32_t *fillInVec, int32_t capacity, UErrorCode *status); 1.499 + 1.500 +/** 1.501 + * Return the locale of the break iterator. You can choose between the valid and 1.502 + * the actual locale. 1.503 + * @param bi break iterator 1.504 + * @param type locale type (valid or actual) 1.505 + * @param status error code 1.506 + * @return locale string 1.507 + * @stable ICU 2.8 1.508 + */ 1.509 +U_STABLE const char* U_EXPORT2 1.510 +ubrk_getLocaleByType(const UBreakIterator *bi, ULocDataLocaleType type, UErrorCode* status); 1.511 + 1.512 +/** 1.513 + * Set the subject text string upon which the break iterator is operating 1.514 + * without changing any other aspect of the state. 1.515 + * The new and previous text strings must have the same content. 1.516 + * 1.517 + * This function is intended for use in environments where ICU is operating on 1.518 + * strings that may move around in memory. It provides a mechanism for notifying 1.519 + * ICU that the string has been relocated, and providing a new UText to access the 1.520 + * string in its new position. 1.521 + * 1.522 + * Note that the break iterator never copies the underlying text 1.523 + * of a string being processed, but always operates directly on the original text 1.524 + * provided by the user. Refreshing simply drops the references to the old text 1.525 + * and replaces them with references to the new. 1.526 + * 1.527 + * Caution: this function is normally used only by very specialized 1.528 + * system-level code. One example use case is with garbage collection 1.529 + * that moves the text in memory. 1.530 + * 1.531 + * @param bi The break iterator. 1.532 + * @param text The new (moved) text string. 1.533 + * @param status Receives errors detected by this function. 1.534 + * 1.535 + * @stable ICU 49 1.536 + */ 1.537 +U_STABLE void U_EXPORT2 1.538 +ubrk_refreshUText(UBreakIterator *bi, 1.539 + UText *text, 1.540 + UErrorCode *status); 1.541 + 1.542 +#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ 1.543 + 1.544 +#endif