parseNumber

Parse a number from a character read pointer.

On success, the read pointer is set behind the number.

@nogc pure nothrow
bool
parseNumber
()
(
ref const(char)* str
,
ref N n
)
if (
isNumeric!N
)

Parameters

opt

Selects features for the implementation. Less features make the parser faster.

str const(char)*

The read pointer.

n N

A reference to a number to be overwritten with the result.

Return Value

Type: bool

An indication of success. Typically the function fails when a number cannot be stored in an integer of the given size or invalid characters are encountered.

Meta