1.3 KiB
1.3 KiB
title | description | menu | weight | flux/v0/tags | introduced | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bytes() function | `bytes()` converts a string value to a bytes type. |
|
101 |
|
0.40.0 |
bytes()
converts a string value to a bytes type.
Function type signature
(v: A) => bytes
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
Parameters
v
({{< req >}}) Value to convert.
Examples
Convert a string to bytes
bytes(v: "Example string")// Returns 0x4578616d706c6520737472696e67