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

UBool UnicodeSet::resemblesPropertyPattern ( const UnicodeString pattern,
int32_t  pos 
) [static, private]

Return true if the given position, in the given pattern, appears to be the start of a property set pattern [:foo:], \p{foo}, or \P{foo}, or \N{name}.

Return true if the given position, in the given pattern, appears to be the start of a property set pattern.

Definition at line 1203 of file uniset_props.cpp.

References FALSE, and UnicodeString::length().

Referenced by applyPattern(), and resemblesPattern().

                                                        {
    // Patterns are at least 5 characters long
    if ((pos+5) > pattern.length()) {
        return FALSE;
    }

    // Look for an opening [:, [:^, \p, or \P
    return isPOSIXOpen(pattern, pos) || isPerlOpen(pattern, pos) || isNameOpen(pattern, pos);
}


Generated by  Doxygen 1.6.0   Back to index