Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_STABLE void U_EXPORT2 ubrk_setText ( UBreakIterator bi,
const UChar *  text,
int32_t  textLength,
UErrorCode status 
)

Sets an existing iterator to point to a new piece of text

Parameters:
bi The iterator to use
text The text to be set
textLength The length of the text
status The error code ICU 2.0

Definition at line 164 of file ubrk.cpp.

References BreakIterator::setText(), and UTEXT_INITIALIZER.

{
    BreakIterator *brit = (BreakIterator *)bi;
    UText  ut = UTEXT_INITIALIZER;
    utext_openUChars(&ut, text, textLength, status);
    brit->setText(&ut, *status);
    // A stack allocated UText wrapping a UCHar * string
    //   can be dumped without explicitly closing it.
}


Generated by  Doxygen 1.6.0   Back to index