[#BloombergLP-bdljsn-NumberUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::NumberUtil :relfileprefix: ../../ :mrdocs: Namespace for utilities converting between JSON number text and numeric types. == Synopsis Declared in `<bdljsn_numberutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct NumberUtil; ---- == Description This `struct` provides a namespace for a suite of functions that convert between a JSON formated numeric value and various numerical types. The valid syntax for a JSON formatted numeric value is spelled out in `https://www.rfc‐editor.org/rfc/rfc8259#section‐6`. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdljsn/NumberUtil/Int64.adoc[`Int64`] | This `typedef` is an alias to `bsls::Types::Int64`. | xref:BloombergLP/bdljsn/NumberUtil/Uint64.adoc[`Uint64`] | This `typedef` is an alias to `bsls::Types::Uint64`. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdljsn/NumberUtil/_04enum.adoc[`Unnamed enum`] | Special integer conversion status values. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdljsn/NumberUtil/areEqual.adoc[`areEqual`] | Return `true` if the specified `lhs` and `rhs` represent the same numeric value, and `false` otherwise. | xref:BloombergLP/bdljsn/NumberUtil/asDecimal64.adoc[`asDecimal64`] | Return the closest floating point representation to the specified `value`. | xref:BloombergLP/bdljsn/NumberUtil/asDecimal64Exact.adoc[`asDecimal64Exact`] | Load the specified `result` with the specified `value`. | xref:BloombergLP/bdljsn/NumberUtil/asDouble.adoc[`asDouble`] | Same as the related overload above for `asDouble`. | xref:BloombergLP/bdljsn/NumberUtil/asFloat.adoc[`asFloat`] | Return the closest floating point representation to the specified `value`. | xref:BloombergLP/bdljsn/NumberUtil/asInt.adoc[`asInt`] | Same as the related overload above for `asInt`. | xref:BloombergLP/bdljsn/NumberUtil/asInt64.adoc[`asInt64`] | Same as the related overload above for `asInt64`. | xref:BloombergLP/bdljsn/NumberUtil/asInteger.adoc[`asInteger`] | Load into the specified `result` the integer conversion of `value`. | xref:BloombergLP/bdljsn/NumberUtil/asLong.adoc[`asLong`] | Same as the related overload above for `asLong`. | xref:BloombergLP/bdljsn/NumberUtil/asLonglong.adoc[`asLonglong`] | Same as the related overload above for `asLonglong`. | xref:BloombergLP/bdljsn/NumberUtil/asShort.adoc[`asShort`] | Load the specified `result` with the specified `value`. | xref:BloombergLP/bdljsn/NumberUtil/asUint.adoc[`asUint`] | Same as the related overload above for `asUint`. | xref:BloombergLP/bdljsn/NumberUtil/asUint64.adoc[`asUint64`] | Same as the related overload above for `asUint64`. | xref:BloombergLP/bdljsn/NumberUtil/asUlong.adoc[`asUlong`] | Load the specified `result` with the specified `value`. | xref:BloombergLP/bdljsn/NumberUtil/asUlonglong.adoc[`asUlonglong`] | Same as the related overload above for `asUlonglong`. | xref:BloombergLP/bdljsn/NumberUtil/asUshort.adoc[`asUshort`] | Same as the related overload above for `asUshort`. | xref:BloombergLP/bdljsn/NumberUtil/isIntegralNumber.adoc[`isIntegralNumber`] | Return `true` if the specified `value` is a valid integral JSON number. | xref:BloombergLP/bdljsn/NumberUtil/isValidNumber.adoc[`isValidNumber`] | Return `true` if the specified `value` is a valid JSON number. | xref:BloombergLP/bdljsn/NumberUtil/stringify-0c.adoc[`stringify`] | `stringify` overloads |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#