Workalike compatibility version of std::from_chars from C++17 for float.

Synopsis

Declared in <absl/strings/charconv.h>

absl::from_chars_result
from_chars(
    char const* first,
    char const* last,
    float& value,
    chars_format fmt = chars_format::general);

Return Value

A from_chars_result describing where parsing stopped and any error.

Parameters

Name

Description

first

Pointer to the first character of the input range.

last

Pointer to one past the last character of the input range.

value

Set to the parsed number when a match is found.

fmt

The floating‐point format to accept.

Created with MrDocs