bytes->replace
Replaces bytes.
Target
Signature
1bytes->replace(find::bytes, replace::bytes)Replaces bytes.
bytes->replace is called with member syntax on a receiver value. bytes->replace 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
find- Required value of type
bytes. Supplyfindpositionally unless the signature shows a keyword form. replace- Required value of type
bytes. Supplyreplacepositionally unless the signature shows a keyword form.
Examples
Basic call
1bytes('a-b')->replace(bytes('-'), bytes(':'))The example keeps binary work on bytes and converts only when text output is needed.