18 lines
452 B
Plaintext
18 lines
452 B
Plaintext
:sig
|
|
u64 DValue::to_u64(u64 default_value = 0) const
|
|
|
|
:params
|
|
u64 : fallback returned when conversion is not possible
|
|
return value : converted value or the fallback
|
|
|
|
:see
|
|
0_DValue
|
|
2_DValue_get_by_path
|
|
|
|
:content
|
|
Converts strings, f64, bool, pointer, and single-value maps to an unsigned integer. Invalid or empty strings return the default. Negative values clamp to zero and oversized values clamp to `u64` max.
|
|
|
|
```cpp
|
|
u64 id = row["id"].to_u64();
|
|
```
|