bytes->padTrailing
Pads bytes on the right.
Target
Signature
1bytes->padTrailing(tosize::integer, with= ?)Pads bytes on the right.
bytes->padTrailing is called with member syntax on a receiver value. bytes->padTrailing 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
tosize- Required value of type
integer. Supplytosizepositionally unless the signature shows a keyword form. with- Optional value. Supply
withpositionally unless the signature shows a keyword form.
Examples
Basic call
1bytes('7')->padTrailing(3, bytes('0'))The example keeps binary work on bytes and converts only when text output is needed.