ICU 56.1
56.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
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-2015, 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
97
typedef
enum
UBreakIteratorType
{
99
UBRK_CHARACTER
= 0,
101
UBRK_WORD
= 1,
103
UBRK_LINE
= 2,
105
UBRK_SENTENCE
= 3,
106
107
#ifndef U_HIDE_DEPRECATED_API
108
116
UBRK_TITLE
= 4,
117
#endif
/* U_HIDE_DEPRECATED_API */
118
UBRK_COUNT = 5
119
}
UBreakIteratorType
;
120
124
#define UBRK_DONE ((int32_t) -1)
125
126
135
typedef
enum
UWordBreak
{
138
UBRK_WORD_NONE
= 0,
140
UBRK_WORD_NONE_LIMIT
= 100,
142
UBRK_WORD_NUMBER
= 100,
144
UBRK_WORD_NUMBER_LIMIT
= 200,
147
UBRK_WORD_LETTER
= 200,
149
UBRK_WORD_LETTER_LIMIT
= 300,
151
UBRK_WORD_KANA
= 300,
153
UBRK_WORD_KANA_LIMIT
= 400,
155
UBRK_WORD_IDEO
= 400,
157
UBRK_WORD_IDEO_LIMIT
= 500
158
}
UWordBreak
;
159
168
typedef
enum
ULineBreakTag
{
171
UBRK_LINE_SOFT
= 0,
173
UBRK_LINE_SOFT_LIMIT
= 100,
175
UBRK_LINE_HARD
= 100,
177
UBRK_LINE_HARD_LIMIT
= 200
178
}
ULineBreakTag
;
179
180
181
190
typedef
enum
USentenceBreakTag
{
195
UBRK_SENTENCE_TERM
= 0,
197
UBRK_SENTENCE_TERM_LIMIT
= 100,
202
UBRK_SENTENCE_SEP
= 100,
204
UBRK_SENTENCE_SEP_LIMIT
= 200
206
}
USentenceBreakTag
;
207
208
225
U_STABLE
UBreakIterator
* U_EXPORT2
226
ubrk_open
(
UBreakIteratorType
type,
227
const
char
*locale,
228
const
UChar
*text,
229
int32_t textLength,
230
UErrorCode
*status);
231
247
U_STABLE
UBreakIterator
* U_EXPORT2
248
ubrk_openRules
(
const
UChar
*rules,
249
int32_t rulesLength,
250
const
UChar
*text,
251
int32_t textLength,
252
UParseError
*parseErr,
253
UErrorCode
*status);
254
273
U_STABLE
UBreakIterator
* U_EXPORT2
274
ubrk_safeClone
(
275
const
UBreakIterator
*bi,
276
void
*stackBuffer,
277
int32_t *pBufferSize,
278
UErrorCode
*status);
279
280
#ifndef U_HIDE_DEPRECATED_API
281
286
#define U_BRK_SAFECLONE_BUFFERSIZE 1
287
288
#endif
/* U_HIDE_DEPRECATED_API */
289
296
U_STABLE
void
U_EXPORT2
297
ubrk_close
(
UBreakIterator
*bi);
298
299
#if U_SHOW_CPLUSPLUS_API
300
301
U_NAMESPACE_BEGIN
302
312
U_DEFINE_LOCAL_OPEN_POINTER
(
LocalUBreakIteratorPointer
,
UBreakIterator
,
ubrk_close
);
313
314
U_NAMESPACE_END
315
316
#endif
317
326
U_STABLE
void
U_EXPORT2
327
ubrk_setText
(
UBreakIterator
* bi,
328
const
UChar
* text,
329
int32_t textLength,
330
UErrorCode
* status);
331
332
350
U_STABLE
void
U_EXPORT2
351
ubrk_setUText
(
UBreakIterator
* bi,
352
UText
* text,
353
UErrorCode
* status);
354
355
356
365
U_STABLE
int32_t U_EXPORT2
366
ubrk_current
(
const
UBreakIterator
*bi);
367
377
U_STABLE
int32_t U_EXPORT2
378
ubrk_next
(
UBreakIterator
*bi);
379
389
U_STABLE
int32_t U_EXPORT2
390
ubrk_previous
(
UBreakIterator
*bi);
391
399
U_STABLE
int32_t U_EXPORT2
400
ubrk_first
(
UBreakIterator
*bi);
401
411
U_STABLE
int32_t U_EXPORT2
412
ubrk_last
(
UBreakIterator
*bi);
413
423
U_STABLE
int32_t U_EXPORT2
424
ubrk_preceding
(
UBreakIterator
*bi,
425
int32_t offset);
426
436
U_STABLE
int32_t U_EXPORT2
437
ubrk_following
(
UBreakIterator
*bi,
438
int32_t offset);
439
449
U_STABLE
const
char
* U_EXPORT2
450
ubrk_getAvailable
(int32_t index);
451
460
U_STABLE
int32_t U_EXPORT2
461
ubrk_countAvailable
(
void
);
462
463
473
U_STABLE
UBool
U_EXPORT2
474
ubrk_isBoundary
(
UBreakIterator
*bi, int32_t offset);
475
485
U_STABLE
int32_t U_EXPORT2
486
ubrk_getRuleStatus
(
UBreakIterator
*bi);
487
505
U_STABLE
int32_t U_EXPORT2
506
ubrk_getRuleStatusVec
(
UBreakIterator
*bi, int32_t *fillInVec, int32_t capacity,
UErrorCode
*status);
507
517
U_STABLE
const
char
* U_EXPORT2
518
ubrk_getLocaleByType
(
const
UBreakIterator
*bi,
ULocDataLocaleType
type,
UErrorCode
* status);
519
545
U_STABLE
void
U_EXPORT2
546
ubrk_refreshUText
(
UBreakIterator
*bi,
547
UText
*text,
548
UErrorCode
*status);
549
550
#endif
/* #if !UCONFIG_NO_BREAK_ITERATION */
551
552
#endif
Generated on Wed Oct 7 2015 21:17:57 for ICU 56.1 by
1.8.1.2