tryParse

Parses a character range to a floating point number.

pure nothrow @nogc
bool
tryParse
(
Source
Target
)
(
ref Source source
,
out Target target
)
if (
isInputRange!Source &&
isSomeChar!(ElementType!Source)
&&
!is(Source == enum)
&&
isFloatingPoint!Target
&&
!is(Target == enum)
)

Parameters

source Source

the lvalue of the range to parse

target Target

floating point value to store the result in

Return Value

Type: bool

true if a number was successfully parsed.

Meta