[#BloombergLP-bdlb-NumericParseUtil-parseSignedInteger-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/NumericParseUtil.adoc[NumericParseUtil]::parseSignedInteger :relfileprefix: ../../../ :mrdocs: Parse the specified `inputString` for an optional sign followed by a sequence of characters representing digits in the specified `base`, consuming the maximum that will form a number whose value is less than or equal to the specified `maxValue` and greater than or equal to the specified `minValue`. Place into the specified `result` the extracted value. Optionally specify `remainder`, in which to store the remainder of the `inputString` immediately following the successfully parsed text, or the position at which a parse failure was detected. Return 0 on success, and a non‐zero value otherwise. The value of `result` is unchanged if a parse failure occurs. The behavior is undefined unless `maxValue` a positive integer, and `minValue` is negative (this is required to allow for efficient implementation). The behavior is also undefined unless `2 <= base` and `base <= 36`, (i.e., bases where digits are representable by characters `[ 0 .. 9 ]`, `[ a .. z ]` or `[ A .. Z ]`). == Synopsis Declared in `<bdlb_numericparseutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int parseSignedInteger( xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64]* result, std::string_view const& inputString, int base, xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] const minValue, xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] const maxValue); ---- == Description A parse failure can occur for the following reasons: 1. The parsed string is not a `<NUMBER>`, i.e., does not contain an optional sign followed by at least one digit. 2. The first digit in `inputString` is larger than `maxValue` or smaller than `minValue`. 3. The first digit is not a valid number for the `base`. [.small]#Created with https://www.mrdocs.com[MrDocs]#