00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00027
#ifndef __USET_H__
00028
#define __USET_H__
00029
00030
#include "unicode/utypes.h"
00031
00032
#ifndef UCNV_H
00033
struct USet;
00039
typedef struct USet USet;
00040 #endif
00041
00047
enum {
00052
USET_IGNORE_SPACE = 1,
00053
00060
USET_CASE_INSENSITIVE = 2,
00061
00067
USET_CASE = 2,
00072
USET_SERIALIZED_STATIC_ARRAY_CAPACITY=8
00073 };
00074
00080
typedef struct USerializedSet {
00085
const uint16_t *array;
00090
int32_t bmpLength;
00095 int32_t length;
00100
uint16_t staticArray[
USET_SERIALIZED_STATIC_ARRAY_CAPACITY];
00101 }
USerializedSet;
00102
00103
00104
00105
00106
00116
U_STABLE USet*
U_EXPORT2
00117
uset_open(UChar32 start, UChar32 end);
00118
00128
U_STABLE USet*
U_EXPORT2
00129
uset_openPattern(
const UChar* pattern, int32_t patternLength,
00130 UErrorCode* ec);
00131
00143
U_STABLE USet*
U_EXPORT2
00144
uset_openPatternOptions(
const UChar* pattern, int32_t patternLength,
00145 uint32_t options,
00146 UErrorCode* ec);
00147
00154
U_STABLE void U_EXPORT2
00155
uset_close(USet* set);
00156
00177
U_DRAFT int32_t U_EXPORT2
00178
uset_applyPattern(USet *set,
00179
const UChar *pattern, int32_t patternLength,
00180 uint32_t options,
00181 UErrorCode *status);
00182
00198
U_STABLE int32_t U_EXPORT2
00199
uset_toPattern(
const USet* set,
00200 UChar* result, int32_t resultCapacity,
00201 UBool escapeUnprintable,
00202 UErrorCode* ec);
00203
00211
U_STABLE void U_EXPORT2
00212
uset_add(USet* set, UChar32 c);
00213
00225
U_DRAFT void U_EXPORT2
00226
uset_addAll(USet* set,
const USet *additionalSet);
00227
00236
U_STABLE void U_EXPORT2
00237
uset_addRange(USet* set, UChar32 start, UChar32 end);
00238
00247
U_STABLE void U_EXPORT2
00248
uset_addString(USet* set,
const UChar* str, int32_t strLen);
00249
00257
U_STABLE void U_EXPORT2
00258
uset_remove(USet* set, UChar32 c);
00259
00268
U_STABLE void U_EXPORT2
00269
uset_removeRange(USet* set, UChar32 start, UChar32 end);
00270
00279
U_STABLE void U_EXPORT2
00280
uset_removeString(USet* set,
const UChar* str, int32_t strLen);
00281
00289
U_STABLE void U_EXPORT2
00290
uset_complement(USet* set);
00291
00298
U_STABLE void U_EXPORT2
00299
uset_clear(USet* set);
00300
00308
U_STABLE UBool U_EXPORT2
00309
uset_isEmpty(
const USet* set);
00310
00318
U_STABLE UBool U_EXPORT2
00319
uset_contains(
const USet* set, UChar32 c);
00320
00330
U_STABLE UBool U_EXPORT2
00331
uset_containsRange(
const USet* set, UChar32 start, UChar32 end);
00332
00341
U_STABLE UBool U_EXPORT2
00342
uset_containsString(
const USet* set,
const UChar* str, int32_t strLen);
00343
00352
U_STABLE int32_t U_EXPORT2
00353
uset_size(
const USet* set);
00354
00363
U_STABLE int32_t U_EXPORT2
00364
uset_getItemCount(
const USet* set);
00365
00384
U_STABLE int32_t U_EXPORT2
00385
uset_getItem(
const USet* set, int32_t itemIndex,
00386 UChar32* start, UChar32* end,
00387 UChar* str, int32_t strCapacity,
00388 UErrorCode* ec);
00389
00390
00391
00395
U_INTERNAL UBool U_EXPORT2
00396
uset_containsAll(
const USet* set1,
const USet* set2);
00397
00401
U_INTERNAL UBool U_EXPORT2
00402
uset_containsNone(
const USet* set1,
const USet* set2);
00403
00407
U_INTERNAL UBool U_EXPORT2
00408
uset_equals(
const USet* set1,
const USet* set2);
00409
00410
00411
00412
00413
00463
U_STABLE int32_t U_EXPORT2
00464
uset_serialize(
const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* pErrorCode);
00465
00474
U_STABLE UBool U_EXPORT2
00475
uset_getSerializedSet(
USerializedSet* fillSet,
const uint16_t* src, int32_t srcLength);
00476
00484
U_STABLE void U_EXPORT2
00485
uset_setSerializedToOne(
USerializedSet* fillSet, UChar32 c);
00486
00495
U_STABLE UBool U_EXPORT2
00496
uset_serializedContains(
const USerializedSet* set, UChar32 c);
00497
00507
U_STABLE int32_t U_EXPORT2
00508
uset_getSerializedRangeCount(
const USerializedSet* set);
00509
00523
U_STABLE UBool U_EXPORT2
00524
uset_getSerializedRange(
const USerializedSet* set, int32_t rangeIndex,
00525 UChar32* pStart, UChar32* pEnd);
00526
00527
#endif