This commit is contained in:
root
2026-06-15 21:42:50 +00:00
parent 34a97e2577
commit 99cd92fb4a
126 changed files with 1615 additions and 1057 deletions
+17
View File
@@ -0,0 +1,17 @@
:sig
bool DValue::to_bool(bool default_value = false) const
:params
bool : 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, numbers, bools, pointers, and maps to bool. Text such as `true`, `yes`, `on`, `1`, `false`, `no`, `off`, `0`, and `null` is recognized; non-empty unparseable strings are truthy; empty strings use the default. Multi-child maps are true when non-empty.
```cpp
if(context.props["enabled"].to_bool(true)) print("enabled");
```