00001
00002
00003
00004
00005
00006 #ifndef UBRK_H
00007 #define UBRK_H
00008
00009 #include "unicode/utypes.h"
00166 typedef void* UBreakIterator;
00167
00169 enum UBreakIteratorType {
00171 UBRK_CHARACTER,
00173 UBRK_WORD,
00175 UBRK_LINE,
00177 UBRK_SENTENCE
00178 };
00179 typedef enum UBreakIteratorType UBreakIteratorType;
00180
00184 #define UBRK_DONE ((UTextOffset) -1)
00185
00200 U_CAPI UBreakIterator*
00201 ubrk_open(UBreakIteratorType type,
00202 const char *locale,
00203 const UChar *text,
00204 int32_t textLength,
00205 UErrorCode *status);
00206
00219 U_CAPI UBreakIterator*
00220 ubrk_openRules(const UChar *rules,
00221 int32_t rulesLength,
00222 const UChar *text,
00223 int32_t textLength,
00224 UErrorCode *status);
00225
00232 U_CAPI void
00233 ubrk_close(UBreakIterator *bi);
00234
00239 U_CAPI void
00240 ubrk_setText(UBreakIterator* bi,
00241 const UChar* text,
00242 int32_t textLength,
00243 UErrorCode* status);
00244
00253 U_CAPI UTextOffset
00254 ubrk_current(const UBreakIterator *bi);
00255
00265 U_CAPI UTextOffset
00266 ubrk_next(UBreakIterator *bi);
00267
00277 U_CAPI UTextOffset
00278 ubrk_previous(UBreakIterator *bi);
00279
00288 U_CAPI UTextOffset
00289 ubrk_first(UBreakIterator *bi);
00290
00301 U_CAPI UTextOffset
00302 ubrk_last(UBreakIterator *bi);
00303
00313 U_CAPI UTextOffset
00314 ubrk_preceding(UBreakIterator *bi,
00315 UTextOffset offset);
00316
00326 U_CAPI UTextOffset
00327 ubrk_following(UBreakIterator *bi,
00328 UTextOffset offset);
00329
00339 U_CAPI const char*
00340 ubrk_getAvailable(int32_t index);
00341
00350 U_CAPI int32_t
00351 ubrk_countAvailable(void);
00352
00353 #endif