2
*******************************************************************************
4
* Copyright (C) 1998-1999, International Business Machines
5
* Corporation and others. All Rights Reserved.
7
*******************************************************************************
11
* Modification History:
13
* Date Name Description
14
* 12/03/98 stephen Creation.
15
* 03/12/99 stephen Modified for new C API.
16
*******************************************************************************
22
#include "unicode/utypes.h"
26
* Simple struct for a scanset pair, ie a-z or A-Z
28
struct u_scanf_scanset_pair {
32
typedef struct u_scanf_scanset_pair u_scanf_scanset_pair;
34
#define U_SCANF_MAX_SCANSET_SIZE 512
37
* Struct representing a scanset
39
struct u_scanf_scanset {
40
UBool is_inclusive; /* false if '^' is given */
42
UChar singles [U_SCANF_MAX_SCANSET_SIZE];
43
u_scanf_scanset_pair pairs [U_SCANF_MAX_SCANSET_SIZE];
45
int32_t single_count; /* count of single chars in set */
46
int32_t pair_count; /* count of pairs in set */
48
typedef struct u_scanf_scanset u_scanf_scanset;
51
* Init a u_scanf_scanset.
52
* @param scanset A pointer to the u_scanf_scanset to init.
53
* @param s A pointer to the first character in the scanset
54
* @param len On input, a pointer to the length of <TT>s</TT>. On output,
55
* a pointer to the number of characters parsed, excluding the final ']'
56
* @return TRUE if successful, FALSE otherwise.
59
u_scanf_scanset_init(u_scanf_scanset *scanset,
64
* Determine if a UChar is in a u_scanf_scanset
65
* @param scanset A pointer to a u_scanf_scanset
66
* @param c The UChar to test.
67
* @return TRUE if the UChar is in the scanset, FALSE otherwise
70
u_scanf_scanset_in(u_scanf_scanset *scanset,