[#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&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;numberutil&period;h&gt;`

[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&period; The valid syntax for a JSON formatted numeric value is spelled out in `https&colon;&sol;&sol;www&period;rfc&hyphen;editor&period;org&sol;rfc&sol;rfc8259&num;section&hyphen;6`&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdljsn/NumberUtil/Int64.adoc[`Int64`] 
| This `typedef` is an alias to `bsls&colon;&colon;Types&colon;&colon;Int64`&period;
| xref:BloombergLP/bdljsn/NumberUtil/Uint64.adoc[`Uint64`] 
| This `typedef` is an alias to `bsls&colon;&colon;Types&colon;&colon;Uint64`&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdljsn/NumberUtil/_04enum.adoc[`Unnamed enum`] 
| Special integer conversion status values&period;
|===


== 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&period;
| xref:BloombergLP/bdljsn/NumberUtil/asDecimal64.adoc[`asDecimal64`] 
| Return the closest floating point representation to the specified `value`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asDecimal64Exact.adoc[`asDecimal64Exact`] 
| Load the specified `result` with the specified `value`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asDouble.adoc[`asDouble`] 
| Same as the related overload above for `asDouble`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asFloat.adoc[`asFloat`] 
| Return the closest floating point representation to the specified `value`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asInt.adoc[`asInt`] 
| Same as the related overload above for `asInt`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asInt64.adoc[`asInt64`] 
| Same as the related overload above for `asInt64`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asInteger.adoc[`asInteger`] 
| Load into the specified `result` the integer conversion of `value`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asLong.adoc[`asLong`] 
| Same as the related overload above for `asLong`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asLonglong.adoc[`asLonglong`] 
| Same as the related overload above for `asLonglong`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asShort.adoc[`asShort`] 
| Load the specified `result` with the specified `value`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asUint.adoc[`asUint`] 
| Same as the related overload above for `asUint`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asUint64.adoc[`asUint64`] 
| Same as the related overload above for `asUint64`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asUlong.adoc[`asUlong`] 
| Load the specified `result` with the specified `value`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asUlonglong.adoc[`asUlonglong`] 
| Same as the related overload above for `asUlonglong`&period;
| xref:BloombergLP/bdljsn/NumberUtil/asUshort.adoc[`asUshort`] 
| Same as the related overload above for `asUshort`&period;
| xref:BloombergLP/bdljsn/NumberUtil/isIntegralNumber.adoc[`isIntegralNumber`] 
| Return `true` if the specified `value` is a valid integral JSON number&period;
| xref:BloombergLP/bdljsn/NumberUtil/isValidNumber.adoc[`isValidNumber`] 
| Return `true` if the specified `value` is a valid JSON number&period;
| xref:BloombergLP/bdljsn/NumberUtil/stringify-0c.adoc[`stringify`] 
| `stringify` overloads
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
