int Ni_GetValueBool( Ni_node restrict n );
Returns the given node's value, interpreted as a boolean.
n (in) should be the Ni_node whose value you want.
Returns nonzero if the node's value can be interpreted as true, or 0 if interpreted as false. Returns 0 if n has no value.
Also returns 0 if you pass NULL for n.
The following strings evaluate to true:
- Anything starting with a T or Y, case insensitive.
- The string "on", case insensitive.
- Anything that is interpreted as nonzero by strtol() with its third (base) parameter as 0. See some documentation on strtol() for the implications of this, but it generally covers any nonzero numeric string.
Everything else is considered false.
See also Ni_GetValue().