Logo Search packages:      
Sourcecode: icu version File versions

void DecimalFormat::parse ( const UnicodeString text,
Formattable result,
ParsePosition parsePosition 
) const [virtual]

Parse the given string using this object's choices. The method does string comparisons to try to find an optimal match. If no object can be parsed, index is unchanged, and NULL is returned. The result is returned as the most parsimonious type of Formattable that will accomodate all of the necessary precision. For example, if the result is exactly 12, it will be returned as a long. However, if it is 1.5, it will be returned as a double.

Parameters:
textThe text to be parsed.
resultFormattable to be set to the parse result. If parse fails, return contents are undefined.
parsePositionThe position to start parsing at on input. On output, moved to after the last successfully parse character. On parse failure, does not change.
See also:
Formattable ICU 2.0

Implements NumberFormat.

Definition at line 1562 of file decimfmt.cpp.

References FALSE.

Referenced by NFSubstitution::doParse(), parse(), parseCurrency(), NumberFormatRegressionTest::Test4145457(), NumberFormatRegressionTest::Test4170798(), NumberFormatRegressionTest::Test4216742(), NumberFormatRegressionTest::Test4243108(), IntlTestDecimalFormatAPI::testAPI(), TestMessageFormat::testBug3(), NumberFormatTest::TestExponential(), NumberFormatTest::TestLenientParse(), IntlTestDateFormatAPI::TestNameHiding(), and NumberFormatTest::TestParse().

                                                         {
    parse(text, result, parsePosition, FALSE);
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index