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* U_EXPORT2
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* U_EXPORT2
00220 ubrk_openRules(const UChar *rules,
00221 int32_t rulesLength,
00222 const UChar *text,
00223 int32_t textLength,
00224 UErrorCode *status);
00225
00244 U_CAPI UBreakIterator * U_EXPORT2
00245 ubrk_safeClone(
00246 const UBreakIterator *bi,
00247 void *stackBuffer,
00248 int32_t *pBufferSize,
00249 UErrorCode *status);
00250
00251 #define U_BRK_SAFECLONE_BUFFERSIZE 512
00252
00259 U_CAPI void U_EXPORT2
00260 ubrk_close(UBreakIterator *bi);
00261
00266 U_CAPI void U_EXPORT2
00267 ubrk_setText(UBreakIterator* bi,
00268 const UChar* text,
00269 int32_t textLength,
00270 UErrorCode* status);
00271
00280 U_CAPI UTextOffset U_EXPORT2
00281 ubrk_current(const UBreakIterator *bi);
00282
00292 U_CAPI UTextOffset U_EXPORT2
00293 ubrk_next(UBreakIterator *bi);
00294
00304 U_CAPI UTextOffset U_EXPORT2
00305 ubrk_previous(UBreakIterator *bi);
00306
00315 U_CAPI UTextOffset U_EXPORT2
00316 ubrk_first(UBreakIterator *bi);
00317
00328 U_CAPI UTextOffset U_EXPORT2
00329 ubrk_last(UBreakIterator *bi);
00330
00340 U_CAPI UTextOffset U_EXPORT2
00341 ubrk_preceding(UBreakIterator *bi,
00342 UTextOffset offset);
00343
00353 U_CAPI UTextOffset U_EXPORT2
00354 ubrk_following(UBreakIterator *bi,
00355 UTextOffset offset);
00356
00366 U_CAPI const char* U_EXPORT2
00367 ubrk_getAvailable(int32_t index);
00368
00377 U_CAPI int32_t U_EXPORT2
00378 ubrk_countAvailable(void);
00379
00380 #endif