as
Type-safe value extraction for CfNode pointers (UFCS).
Converts the node's value to the requested type. For incompatible types or null pointers, returns the type's .init value.
Supported types:
string- for STRING, DATE, TIME, DATETIME nodeslong,int,short,byte- for INTEGER nodesulong,uint,ushort,ubyte- for INTEGER nodesdouble,float- for FLOAT and INTEGER nodesbool- for BOOLEAN nodes
Example:
auto doc = parseCFDocument(`name = "test", count = 42`);
string name = doc["name"].as!string; // "test"
long count = doc["count"].as!long; // 42Type-safe value extraction for const CfNode pointers (UFCS).
Parameters
self | The const node pointer to extract value from |
Returns
The value converted to type T, or T.init if incompatible or null.
Type-safe value extraction for CfNode references (UFCS).
Parameters
self | The node reference to extract value from |
Returns
The value converted to type T, or T.init if incompatible.