123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552 |
- #ifndef UBRK_H
- #define UBRK_H
- #include "unicode/utypes.h"
- #include "unicode/uloc.h"
- #include "unicode/utext.h"
- #include "unicode/localpointer.h"
- #ifndef UBRK_TYPEDEF_UBREAK_ITERATOR
- # define UBRK_TYPEDEF_UBREAK_ITERATOR
-
- typedef struct UBreakIterator UBreakIterator;
- #endif
- #if !UCONFIG_NO_BREAK_ITERATION
- #include "unicode/parseerr.h"
- typedef enum UBreakIteratorType {
-
- UBRK_CHARACTER = 0,
-
- UBRK_WORD = 1,
-
- UBRK_LINE = 2,
-
- UBRK_SENTENCE = 3,
- #ifndef U_HIDE_DEPRECATED_API
-
- UBRK_TITLE = 4,
- #endif
- UBRK_COUNT = 5
- } UBreakIteratorType;
- #define UBRK_DONE ((int32_t) -1)
- typedef enum UWordBreak {
-
- UBRK_WORD_NONE = 0,
-
- UBRK_WORD_NONE_LIMIT = 100,
-
- UBRK_WORD_NUMBER = 100,
-
- UBRK_WORD_NUMBER_LIMIT = 200,
-
- UBRK_WORD_LETTER = 200,
-
- UBRK_WORD_LETTER_LIMIT = 300,
-
- UBRK_WORD_KANA = 300,
-
- UBRK_WORD_KANA_LIMIT = 400,
-
- UBRK_WORD_IDEO = 400,
-
- UBRK_WORD_IDEO_LIMIT = 500
- } UWordBreak;
- typedef enum ULineBreakTag {
-
- UBRK_LINE_SOFT = 0,
-
- UBRK_LINE_SOFT_LIMIT = 100,
-
- UBRK_LINE_HARD = 100,
-
- UBRK_LINE_HARD_LIMIT = 200
- } ULineBreakTag;
- typedef enum USentenceBreakTag {
-
- UBRK_SENTENCE_TERM = 0,
-
- UBRK_SENTENCE_TERM_LIMIT = 100,
-
- UBRK_SENTENCE_SEP = 100,
-
- UBRK_SENTENCE_SEP_LIMIT = 200
-
- } USentenceBreakTag;
- U_STABLE UBreakIterator* U_EXPORT2
- ubrk_open(UBreakIteratorType type,
- const char *locale,
- const UChar *text,
- int32_t textLength,
- UErrorCode *status);
- U_STABLE UBreakIterator* U_EXPORT2
- ubrk_openRules(const UChar *rules,
- int32_t rulesLength,
- const UChar *text,
- int32_t textLength,
- UParseError *parseErr,
- UErrorCode *status);
- U_STABLE UBreakIterator * U_EXPORT2
- ubrk_safeClone(
- const UBreakIterator *bi,
- void *stackBuffer,
- int32_t *pBufferSize,
- UErrorCode *status);
- #ifndef U_HIDE_DEPRECATED_API
- #define U_BRK_SAFECLONE_BUFFERSIZE 1
- #endif
- U_STABLE void U_EXPORT2
- ubrk_close(UBreakIterator *bi);
- #if U_SHOW_CPLUSPLUS_API
- U_NAMESPACE_BEGIN
- U_DEFINE_LOCAL_OPEN_POINTER(LocalUBreakIteratorPointer, UBreakIterator, ubrk_close);
- U_NAMESPACE_END
- #endif
- U_STABLE void U_EXPORT2
- ubrk_setText(UBreakIterator* bi,
- const UChar* text,
- int32_t textLength,
- UErrorCode* status);
- U_STABLE void U_EXPORT2
- ubrk_setUText(UBreakIterator* bi,
- UText* text,
- UErrorCode* status);
- U_STABLE int32_t U_EXPORT2
- ubrk_current(const UBreakIterator *bi);
- U_STABLE int32_t U_EXPORT2
- ubrk_next(UBreakIterator *bi);
- U_STABLE int32_t U_EXPORT2
- ubrk_previous(UBreakIterator *bi);
- U_STABLE int32_t U_EXPORT2
- ubrk_first(UBreakIterator *bi);
- U_STABLE int32_t U_EXPORT2
- ubrk_last(UBreakIterator *bi);
- U_STABLE int32_t U_EXPORT2
- ubrk_preceding(UBreakIterator *bi,
- int32_t offset);
- U_STABLE int32_t U_EXPORT2
- ubrk_following(UBreakIterator *bi,
- int32_t offset);
- U_STABLE const char* U_EXPORT2
- ubrk_getAvailable(int32_t index);
- U_STABLE int32_t U_EXPORT2
- ubrk_countAvailable(void);
- U_STABLE UBool U_EXPORT2
- ubrk_isBoundary(UBreakIterator *bi, int32_t offset);
- U_STABLE int32_t U_EXPORT2
- ubrk_getRuleStatus(UBreakIterator *bi);
- U_STABLE int32_t U_EXPORT2
- ubrk_getRuleStatusVec(UBreakIterator *bi, int32_t *fillInVec, int32_t capacity, UErrorCode *status);
- U_STABLE const char* U_EXPORT2
- ubrk_getLocaleByType(const UBreakIterator *bi, ULocDataLocaleType type, UErrorCode* status);
- U_STABLE void U_EXPORT2
- ubrk_refreshUText(UBreakIterator *bi,
- UText *text,
- UErrorCode *status);
- #endif
- #endif
|