Unsafe wrapper around a Pointer that allows to write values to it while advancing the location and keeping track of how many elements were written.
See also: Pointer#appender.
Creates a slice pointing at the values appended by this instance.
Struct
Struct
Value
Object
Object
Object
Creates a slice pointing at the values appended by this instance.
slice = Slice(Int32).new(5) appender = slice.to_unsafe.appender appender << 1 appender << 2 appender << 3 appender.to_slice # => Slice[1, 2, 3]
© 2012–2026 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.19.0/Pointer/Appender.html