Variant
toUInt64() [Variant class]
Returns the value of the variant to uint64_t
(64-bit unsigned integer), converting the type if necessary. The original value is left unchanged.
Source | Result |
---|---|
bool | false → 0 , true → 1 |
numeric | unchanged |
String | string number → 64-bit unsigned integer |
other | conversion fails |
There are two overloads, one that takes an ok
parameter passed by reference, which is filled in as
true
if the data is already this type or can be converted.
// PROTOTYPES
uint64_t toUInt64() const;
uint64_t toUInt64(bool& ok) const;
See value, as, and to for when to use the toXXX() vs. other accessors.