ICU4C Proposal: Modified uset_applyPattern
"Ram Viswanadha" <[email protected]>
| Newsgroups | gmane.comp.lib.icu.general |
|---|---|
| Message-ID | <[email protected]> |
At the request of George Rhoten, I have included 3 more parameters for the
proposed API.
/**
* 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
* @param patternLength The length of the UChar string
* @param options A bitmask for options to apply to the pattern.
* Valid options are USET_IGNORE_SPACE and
USET_CASE_INSENSITIVE.
* @param parsePos Upon entry, the position at which to begin
parsing.
* The character at pattern.charAt(*parsePos) must
be a '['.
* Upon return from a successful parse, index field
is either
* the character after the closing ']' of the
parsed pattern, or
* pattern.length() if the closing ']' is the last
character of
* the pattern string. If NULL, upon entry the
position at which
* to begin parsing is assumed to be 0.
* @param errorIndex A pointer to recieve information about the index
at
* which a parse error occurred. Can be NULL.
* @param status Returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if
the pattern
* contains a syntax error.
* @return Retruns the pointer to the passed in USet
* @draft ICU 2.8
*/
U_CAPI USet* U_EXPORT2
uset_applyPattern(USet *set,
const UChar *pattern, int32_t patternLength,
int32_t *parsePos,
int32_t *errorIndex,
uint32_t options,
UErrorCode *status);
Best Regards,
Ram Viswanadha
ICU
----- Original Message -----
From: "Ram Viswanadha" <[email protected]>
To: <[email protected]>
Sent: Wednesday, October 29, 2003 11:42 AM
Subject: ICU4C Proposal: uset_applyPattern
> Motivation: The C API for Unicode set is a thin wrapper for the C++ API.
The
> C API is not fully fleshed out. The uset_applyPattern API is needed for
some
> APIs that are going into ICU 2.8 release.
>
> Expires: 5th Nov 2003
>
> /**
> * 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
> * @param patternLength The length of the UChar string
> * @param status Returns <code>U_ILLEGAL_ARGUMENT_ERROR</code>
if
> the pattern
> * contains a syntax error.
> * @return Retruns the pointer to the passed in USet
> * @draft ICU 2.8
> */
> U_CAPI USet* U_EXPORT2
> uset_applyPattern(USet *set,
> const UChar* pattern, int32_t patternLength,
> UErrorCode* status);
>
> Best Regards,
>
> Ram Viswanadha
> ICU
>