Re: ICU4C Proposal: Modified uset_applyPattern
"Ram Viswanadha" <[email protected]>
| Newsgroups | gmane.comp.lib.icu.general |
|---|---|
| Message-ID | <[email protected]> |
The committee decided to modify the API again because the previous proposal
was not following C idioms.
/**
* Modifies the set to represent the set specified by the given
* pattern. See the UnicodeSet class description for the syntax of
* the pattern language.
* @param set The set to which the pattern is to be applied.
* @param pattern A pointer to UChar string specifying what
characters are in the set.
* The character at pattern[0] must be a '['.
* @param patternLength The length of the UChar string. -1 if null
terminated.
* @param options A bitmask for options to apply to the pattern.
* Valid options are USET_IGNORE_SPACE and
USET_CASE_INSENSITIVE.
* @param status Returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if
the pattern
* contains a syntax error.
* @return Upon successful parse, the value is either
* the index of the character after the closing ']'
* of the parsed pattern.
* Upon unsuccessful parse the index of the error
is returned.
*
* @draft ICU 2.8
*/
U_CAPI int32_t U_EXPORT2
uset_applyPattern(USet *set,
const UChar *pattern, int32_t patternLength,
uint32_t options,
UErrorCode *status);