bytes->setSize
Changes byte stream size.
Target
Signature
1bytes->setSize(num::integer)Changes byte stream size.
bytes->setSize is called with member syntax on a receiver value. bytes->setSize works with binary values. Convert strings to bytes before byte-level hashing or encoding, then convert back to a string only for display or transport.
Parameters
num- Required value of type
integer. Supplynumpositionally unless the signature shows a keyword form.
Examples
Basic call
1local(b) = bytes('abc')2#b->setSize(2)The example keeps binary work on bytes and converts only when text output is needed.