00001 /* 00002 * Copyright © {1996-1999}, International Business Machines Corporation and others. All Rights Reserved. 00003 ***************************************************************************************** 00004 */ 00005 00006 #ifndef UBRK_H 00007 #define UBRK_H 00008 00009 #include "unicode/utypes.h" 00149 typedef void* UBreakIterator; 00150 00152 enum UBreakIteratorType { 00154 UBRK_CHARACTER, 00156 UBRK_WORD, 00158 UBRK_LINE, 00160 UBRK_SENTENCE 00161 }; 00162 typedef enum UBreakIteratorType UBreakIteratorType; 00163 00167 #define UBRK_DONE ((UTextOffset) -1) 00168 00183 U_CAPI UBreakIterator* 00184 ubrk_open(UBreakIteratorType type, 00185 const char *locale, 00186 const UChar *text, 00187 int32_t textLength, 00188 UErrorCode *status); 00189 00202 U_CAPI UBreakIterator* 00203 ubrk_openRules(const UChar *rules, 00204 int32_t rulesLength, 00205 const UChar *text, 00206 int32_t textLength, 00207 UErrorCode *status); 00208 00215 U_CAPI void 00216 ubrk_close(UBreakIterator *bi); 00217 00222 U_CAPI void 00223 ubrk_setText(UBreakIterator* bi, 00224 const UChar* text, 00225 int32_t textLength, 00226 UErrorCode* status); 00227 00236 U_CAPI UTextOffset 00237 ubrk_current(const UBreakIterator *bi); 00238 00248 U_CAPI UTextOffset 00249 ubrk_next(UBreakIterator *bi); 00250 00260 U_CAPI UTextOffset 00261 ubrk_previous(UBreakIterator *bi); 00262 00271 U_CAPI UTextOffset 00272 ubrk_first(UBreakIterator *bi); 00273 00284 U_CAPI UTextOffset 00285 ubrk_last(UBreakIterator *bi); 00286 00296 U_CAPI UTextOffset 00297 ubrk_preceding(UBreakIterator *bi, 00298 UTextOffset offset); 00299 00309 U_CAPI UTextOffset 00310 ubrk_following(UBreakIterator *bi, 00311 UTextOffset offset); 00312 00322 U_CAPI const char* 00323 ubrk_getAvailable(int32_t index); 00324 00333 U_CAPI int32_t 00334 ubrk_countAvailable(void); 00335 00336 #endif