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 ((int32_t) -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
00252 U_CAPI
UBreakIterator * U_EXPORT2
00253
ubrk_safeClone(
00254
const UBreakIterator *bi,
00255
void *stackBuffer,
00256 int32_t *pBufferSize,
00257 UErrorCode *status);
00258
00259
#define U_BRK_SAFECLONE_BUFFERSIZE 512
00260
00267 U_CAPI
void U_EXPORT2
00268
ubrk_close(UBreakIterator *bi);
00269
00274 U_CAPI
void U_EXPORT2
00275
ubrk_setText(UBreakIterator* bi,
00276
const UChar* text,
00277 int32_t textLength,
00278 UErrorCode* status);
00279
00288 U_CAPI int32_t U_EXPORT2
00289
ubrk_current(
const UBreakIterator *bi);
00290
00300 U_CAPI int32_t U_EXPORT2
00301
ubrk_next(UBreakIterator *bi);
00302
00312 U_CAPI int32_t U_EXPORT2
00313
ubrk_previous(UBreakIterator *bi);
00314
00323 U_CAPI int32_t U_EXPORT2
00324
ubrk_first(UBreakIterator *bi);
00325
00336 U_CAPI int32_t U_EXPORT2
00337
ubrk_last(UBreakIterator *bi);
00338
00348 U_CAPI int32_t U_EXPORT2
00349
ubrk_preceding(UBreakIterator *bi,
00350 int32_t offset);
00351
00361 U_CAPI int32_t U_EXPORT2
00362
ubrk_following(UBreakIterator *bi,
00363 int32_t offset);
00364
00374 U_CAPI
const char* U_EXPORT2
00375
ubrk_getAvailable(int32_t index);
00376
00385 U_CAPI int32_t U_EXPORT2
00386
ubrk_countAvailable(
void);
00387
00388
00397 U_CAPI UBool U_EXPORT2
00398
ubrk_isBoundary(UBreakIterator *bi, int32_t offset);
00399
00400
#endif