Text.bytes
bytesencoding on_problems
Documentation
Returns a vector containing bytes representing the specified encoding of the input text. This is useful for low-level operations, such as binary data encoding.
Arguments
encoding
: The text encoding to encode self with. Defaults to UTF-8.on_problems
: Specifies the behavior when a problem occurs during the function. By default, a warning is issued, but the operation proceeds. If set toReport_Error
, the operation fails with a dataflow error. If set toIgnore
, the operation proceeds without errors or warnings.
Examples
Get the ASCII bytes of the text "Hello".
"Hello".bytes (Encoding.ascii)