00001
00002
00003
00004
00005
00006 #ifndef UBRK_H
00007 #define UBRK_H
00008
00009 #include "unicode/utypes.h"
00171 #ifndef UBRK_TYPEDEF_UBREAK_ITERATOR
00172 # define UBRK_TYPEDEF_UBREAK_ITERATOR
00173 typedef void* UBreakIterator;
00174 #endif
00175
00177 enum UBreakIteratorType {
00179 UBRK_CHARACTER,
00181 UBRK_WORD,
00183 UBRK_LINE,
00185 UBRK_SENTENCE,
00187 UBRK_TITLE
00188 };
00189 typedef enum UBreakIteratorType UBreakIteratorType;
00190
00194 #define UBRK_DONE ((UTextOffset) -1)
00195
00210 U_CAPI UBreakIterator* U_EXPORT2
00211 ubrk_open(UBreakIteratorType type,
00212 const char *locale,
00213 const UChar *text,
00214 int32_t textLength,
00215 UErrorCode *status);
00216
00229 U_CAPI UBreakIterator* U_EXPORT2
00230 ubrk_openRules(const UChar *rules,
00231 int32_t rulesLength,
00232 const UChar *text,
00233 int32_t textLength,
00234 UErrorCode *status);
00235
00254 U_CAPI UBreakIterator * U_EXPORT2
00255 ubrk_safeClone(
00256 const UBreakIterator *bi,
00257 void *stackBuffer,
00258 int32_t *pBufferSize,
00259 UErrorCode *status);
00260
00261 #define U_BRK_SAFECLONE_BUFFERSIZE 512
00262
00269 U_CAPI void U_EXPORT2
00270 ubrk_close(UBreakIterator *bi);
00271
00276 U_CAPI void U_EXPORT2
00277 ubrk_setText(UBreakIterator* bi,
00278 const UChar* text,
00279 int32_t textLength,
00280 UErrorCode* status);
00281
00290 U_CAPI UTextOffset U_EXPORT2
00291 ubrk_current(const UBreakIterator *bi);
00292
00302 U_CAPI UTextOffset U_EXPORT2
00303 ubrk_next(UBreakIterator *bi);
00304
00314 U_CAPI UTextOffset U_EXPORT2
00315 ubrk_previous(UBreakIterator *bi);
00316
00325 U_CAPI UTextOffset U_EXPORT2
00326 ubrk_first(UBreakIterator *bi);
00327
00338 U_CAPI UTextOffset U_EXPORT2
00339 ubrk_last(UBreakIterator *bi);
00340
00350 U_CAPI UTextOffset U_EXPORT2
00351 ubrk_preceding(UBreakIterator *bi,
00352 UTextOffset offset);
00353
00363 U_CAPI UTextOffset U_EXPORT2
00364 ubrk_following(UBreakIterator *bi,
00365 UTextOffset offset);
00366
00376 U_CAPI const char* U_EXPORT2
00377 ubrk_getAvailable(int32_t index);
00378
00387 U_CAPI int32_t U_EXPORT2
00388 ubrk_countAvailable(void);
00389
00390 #endif