Esc

set_string

procedureextensionsince 0.36.1Source
  • macOS: set_string works on macOS
  • Linux: set_string works on Linux
  • Windows: set_string works on Windows
  • Wasm: set_string works on Wasm

Replaces a string with an owned copy. This accepts a slice from another decoded message without sharing its lifetime. A directly assigned non-block string must be an individually owned allocation from the message's allocator.

Signature

set_string :: (owner: *$T, field: *string, replacement: string)

See also