Next: buffer_retrieve
Prev: buffer_len
buffer_replace(buffer, pos, value)This function returns the result of replacing the byte numbered pos in buffer with the value value, with the first byte of buffer is numbered
1. If pos is less than
1, or greater than the length of buffer, then
buffer_replace() throws a ~range error.Examples:
buffer_replace(%[65, 66, 67, 10], 3, 15)
=> %[65, 66, 15, 10]