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

UBool MessageFormat::isLegalArgName ( const UnicodeString argName  )  const [private]

Returns FALSE if the argument name is not legal.

Parameters:
argName argument name.
Returns:
TRUE if the argument name is legal, otherwise return FALSE.

Definition at line 1802 of file msgfmt.cpp.

References UnicodeString::charAt(), FALSE, UnicodeString::length(), and TRUE.

Referenced by makeFormat().

                                                                {
    if(!u_hasBinaryProperty(argName.charAt(0), idStart)) {
        return FALSE;
    }
    for (int32_t i=1; i<argName.length(); ++i) {
        if(!u_hasBinaryProperty(argName.charAt(i), idContinue)) {
            return FALSE;
        }
    }
    return TRUE;
}


Generated by  Doxygen 1.6.0   Back to index