Logo Search packages:      
Sourcecode: icu version File versions  Download package

TransliteratorIDParser::SingleID * TransliteratorIDParser::parseFilterID ( const UnicodeString id,
int32_t &  pos 
) [static]

Parse a filter ID, that is, an ID of the general form "[f1] s1-t1/v1", with the filters optional, and the variants optional.

id the id to be parsed
pos INPUT-OUTPUT parameter. On input, the position of the first character to parse. On output, the position after the last character parsed.
a SingleID object or null if the parse fails

Definition at line 213 of file tridpars.cpp.

References TransliteratorIDParser::Specs::filter, TransliteratorIDParser::SingleID::filter, NULL, specsToID(), and TRUE.

Referenced by RuleHalf::parseSection(), and parseSingleID().


    int32_t start = pos;

    Specs* specs = parseFilterID(id, pos, TRUE);
    if (specs == NULL) {
        pos = start;
        return NULL;

    // Assemble return results
    SingleID* single = specsToID(specs, FORWARD);
    if (single != NULL) {
        single->filter = specs->filter;
    delete specs;
    return single;

Generated by  Doxygen 1.6.0   Back to index