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

void ChoiceFormat::parse ( const UnicodeString text,
Formattable result,
UErrorCode status 
) const [virtual]

Return a long if possible (e.g. within range LONG_MAX, LONG_MAX], and with no decimals), otherwise a double. If IntegerOnly is set, will stop at a decimal point (or equivalent; e.g. for rational numbers "1 2/3", will stop after the 1).

If no object can be parsed, parsePosition is unchanged, and NULL is returned.

text The text to be parsed.
result Formattable to be set to the parse result. If parse fails, return contents are undefined.
status Output param with the formatted string.
See also:
NumberFormat::isParseIntegerOnly ICU 2.0

Reimplemented from NumberFormat.

Definition at line 744 of file choicfmt.cpp.

References NumberFormat::parse().

    NumberFormat::parse(text, result, status);

Generated by  Doxygen 1.6.0   Back to index