@str
Convert a value to its string representation, or decode hex bytes as UTF-8.
Returns: string
Syntax
Section titled “Syntax”@str(value encoding?)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
value |
any |
Input value |
[encoding] |
string |
utf8 to decode hex bytes as a UTF-8 string |
Examples
Section titled “Examples”# Convert a number to stringset $s @str(42)
# Convert an address to stringset $s @str(@me)
# Decode hex bytes as UTF-8set $s @str(0x48656c6c6f utf8)print $s