ICU 4.8.1.1
4.8.1.1
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
common
unicode
ubrk.h
Go to the documentation of this file.
1
/*
2
******************************************************************************
3
* Copyright (C) 1996-2011, International Business Machines Corporation and others.
4
* All Rights Reserved.
5
******************************************************************************
6
*/
7
8
#ifndef UBRK_H
9
#define UBRK_H
10
11
#include "
unicode/utypes.h
"
12
#include "
unicode/uloc.h
"
13
#include "
unicode/utext.h
"
14
#include "
unicode/localpointer.h
"
15
20
#ifndef UBRK_TYPEDEF_UBREAK_ITERATOR
21
# define UBRK_TYPEDEF_UBREAK_ITERATOR
22
26
typedef
struct
UBreakIterator
UBreakIterator
;
27
#endif
28
29
#if !UCONFIG_NO_BREAK_ITERATION
30
31
#include "
unicode/parseerr.h
"
32
87
typedef
enum
UBreakIteratorType
{
89
UBRK_CHARACTER
= 0,
91
UBRK_WORD
= 1,
93
UBRK_LINE
= 2,
95
UBRK_SENTENCE
= 3,
96
97
#ifndef U_HIDE_DEPRECATED_API
98
106
UBRK_TITLE
= 4,
107
#endif
/* U_HIDE_DEPRECATED_API */
108
UBRK_COUNT = 5
109
}
UBreakIteratorType
;
110
114
#define UBRK_DONE ((int32_t) -1)
115
116
125
typedef
enum
UWordBreak
{
128
UBRK_WORD_NONE
= 0,
130
UBRK_WORD_NONE_LIMIT
= 100,
132
UBRK_WORD_NUMBER
= 100,
134
UBRK_WORD_NUMBER_LIMIT
= 200,
137
UBRK_WORD_LETTER
= 200,
139
UBRK_WORD_LETTER_LIMIT
= 300,
141
UBRK_WORD_KANA
= 300,
143
UBRK_WORD_KANA_LIMIT
= 400,
145
UBRK_WORD_IDEO
= 400,
147
UBRK_WORD_IDEO_LIMIT
= 500
148
}
UWordBreak
;
149
158
typedef
enum
ULineBreakTag
{
161
UBRK_LINE_SOFT
= 0,
163
UBRK_LINE_SOFT_LIMIT
= 100,
165
UBRK_LINE_HARD
= 100,
167
UBRK_LINE_HARD_LIMIT
= 200
168
}
ULineBreakTag
;
169
170
171
180
typedef
enum
USentenceBreakTag
{
185
UBRK_SENTENCE_TERM
= 0,
187
UBRK_SENTENCE_TERM_LIMIT
= 100,
192
UBRK_SENTENCE_SEP
= 100,
194
UBRK_SENTENCE_SEP_LIMIT
= 200
196
}
USentenceBreakTag
;
197
198
213
U_STABLE
UBreakIterator
*
U_EXPORT2
214
ubrk_open
(
UBreakIteratorType
type,
215
const
char
*locale,
216
const
UChar
*text,
217
int32_t textLength,
218
UErrorCode
*status);
219
235
U_STABLE
UBreakIterator
*
U_EXPORT2
236
ubrk_openRules
(
const
UChar
*rules,
237
int32_t rulesLength,
238
const
UChar
*text,
239
int32_t textLength,
240
UParseError
*parseErr,
241
UErrorCode
*status);
242
259
U_STABLE
UBreakIterator
*
U_EXPORT2
260
ubrk_safeClone
(
261
const
UBreakIterator
*bi,
262
void
*stackBuffer,
263
int32_t *pBufferSize,
264
UErrorCode
*status);
265
270
#define U_BRK_SAFECLONE_BUFFERSIZE 528
271
278
U_STABLE
void
U_EXPORT2
279
ubrk_close
(
UBreakIterator
*bi);
280
281
#if U_SHOW_CPLUSPLUS_API
282
283
U_NAMESPACE_BEGIN
284
294
U_DEFINE_LOCAL_OPEN_POINTER(LocalUBreakIteratorPointer,
UBreakIterator
,
ubrk_close
);
295
296
U_NAMESPACE_END
297
298
#endif
299
308
U_STABLE
void
U_EXPORT2
309
ubrk_setText
(
UBreakIterator
* bi,
310
const
UChar
* text,
311
int32_t textLength,
312
UErrorCode
* status);
313
314
326
U_STABLE
void
U_EXPORT2
327
ubrk_setUText
(
UBreakIterator
* bi,
328
UText
* text,
329
UErrorCode
* status);
330
331
332
341
U_STABLE
int32_t
U_EXPORT2
342
ubrk_current
(
const
UBreakIterator
*bi);
343
353
U_STABLE
int32_t
U_EXPORT2
354
ubrk_next
(
UBreakIterator
*bi);
355
365
U_STABLE
int32_t
U_EXPORT2
366
ubrk_previous
(
UBreakIterator
*bi);
367
376
U_STABLE
int32_t
U_EXPORT2
377
ubrk_first
(
UBreakIterator
*bi);
378
389
U_STABLE
int32_t
U_EXPORT2
390
ubrk_last
(
UBreakIterator
*bi);
391
401
U_STABLE
int32_t
U_EXPORT2
402
ubrk_preceding
(
UBreakIterator
*bi,
403
int32_t offset);
404
414
U_STABLE
int32_t
U_EXPORT2
415
ubrk_following
(
UBreakIterator
*bi,
416
int32_t offset);
417
427
U_STABLE
const
char
*
U_EXPORT2
428
ubrk_getAvailable
(int32_t index);
429
438
U_STABLE
int32_t
U_EXPORT2
439
ubrk_countAvailable
(
void
);
440
441
451
U_STABLE
UBool
U_EXPORT2
452
ubrk_isBoundary
(
UBreakIterator
*bi, int32_t offset);
453
463
U_STABLE
int32_t
U_EXPORT2
464
ubrk_getRuleStatus
(
UBreakIterator
*bi);
465
483
U_STABLE
int32_t
U_EXPORT2
484
ubrk_getRuleStatusVec
(
UBreakIterator
*bi, int32_t *fillInVec, int32_t capacity,
UErrorCode
*status);
485
495
U_STABLE
const
char
*
U_EXPORT2
496
ubrk_getLocaleByType
(
const
UBreakIterator
*bi,
ULocDataLocaleType
type,
UErrorCode
* status);
497
498
499
#endif
/* #if !UCONFIG_NO_BREAK_ITERATION */
500
501
#endif
Generated on Wed Aug 5 2015 17:45:13 for ICU 4.8.1.1 by
1.8.1.2