BloombergLP::bdlb::NumericParseUtil::parseInt64

parseInt64 overloads

Synopses

Declared in <bdlb_numericparseutil.h>

Parse a 64-bit signed integer from the leading characters of a string.

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

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

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

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
resultlocation to store the parsed value
inputStringtext to parse
basenumeric base in [2 .. 36] (default 10)
remainderunparsed suffix of inputString after a successful parse (unchanged on failure)