All users were logged out of Bugzilla on October 13th, 2018

Consider adding a ParseDouble method to nsAString

RESOLVED INCOMPLETE

Status

()

RESOLVED INCOMPLETE
12 years ago
6 years ago

People

(Reporter: jwatt, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
Could we add a ParseDouble method to nsAString with a signature something like the following. I'm wondering if mStart or mEnd should be iterators or indexes.

/**
 * ParseDouble - parses a double from the string.
 *
 * @param aStart  Index at which parsing should begin.
 * @param aEnd    Out param that (if non-null) is set to the index of the
 *                character at which parsing stops. If a double is not found,
 *                or an error occurs during parsing, aEnd will be set to aStart.
 * @param aStatus Out param used to indicate success or failure. It will be set
 *                to NS_OK if a double is successfully found and parsed from
 *                the string, or else a failure code.
 */
PRFloat64
nsAString::ParseDouble(index_type aStart = 0, index_type *aEnd = nsnull,
                       nsresult *aStatus = nsnull);
Component: XPCOM → String
QA Contact: xpcom → string

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.