#hex->to_number() → number
Its value as a number: 'ff' gives 255.
Example
<let name="x" type="hex" value="'0xFF80'" />
<echo>{ $x->to_number() }</echo>$x: hex = '0xFF80'
echo $x->to_number()A field is a plain fact about the value, read with a dot and no brackets: $value.name. A method takes arguments or does work, and is called with ->: $value->name(arguments), or with the value piped in: $value |> name(arguments).
| Field | Type | Description |
|---|---|---|
.bytes | number | How many bytes it holds: half its number of digits. |
hex->to_number() → number<let name="x" type="hex" value="'0xFF80'" />
<echo>{ $x->to_number() }</echo>$x: hex = '0xFF80'
echo $x->to_number()->convert(from?: 'json'|yaml|'csv'|'markdown'|'latex', to?: 'json'|yaml|'csv'|html|'markdown'|'latex', header?: bool, as?: type, headers?: list, indented?: bool)->from(type: 'json'|yaml|'csv'|'markdown'|'latex', header?: bool, as?: type)->is_a(type: word)->is_null()->or(fallback)->to(type: 'json'|yaml|'csv'|html|'markdown'|'latex', headers?: list, indented?: bool)->to_string()->type()->contains(text, ignore_case?: bool)->count()->ends_with(text, ignore_case?: bool)->escape()->index_of(text, ignore_case?: bool, last?: bool)->markdown_escape()->matches(pattern: regex)->pad(width: number, char?, start?: bool)->slice(start: number, end?: number)->starts_with(text, ignore_case?: bool)->truncate(length: number, suffix?)->upper()->url_encode()