bytes->setRange

Writes bytes into a range.

Target member

Signature

1bytes->setRange(position::integer, data)

Writes bytes into a range.

bytes->setRange is called with member syntax on a receiver value. bytes->setRange 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

position
Required value of type integer. Supply position positionally unless the signature shows a keyword form.
data
Required value. Supply data positionally unless the signature shows a keyword form.

Examples

Basic call

1local(b) = bytes('abc')2#b->setRange(2, bytes('Z'))
The example keeps binary work on bytes and converts only when text output is needed.