Parse a 64‐bit signed integer from a string, also returning the suffix.

Synopsis

Declared in <bdlb_numericparseutil.h>

static
int
parseInt64(
    bsls::Types::Int64* result,
    std::string_view* remainder,
    std::string_view const& inputString,
    int base = 10);

Description

Same as the overload not taking remainder, but store in the specified remainder the remainder of the inputString immediately following the successfully parsed text, or the position at which a parse failure was detected.

Return Value

0 on success, and a non‐zero value otherwise

Parameters

Name

Description

result

location to store the parsed value

remainder

unparsed suffix of inputString after a successful parse (unchanged on failure)

inputString

text to parse

base

numeric base in [2 .. 36] (default 10)

Created with MrDocs