Buffer.readstring
From GiderosMobile
Available since: Gideros 2025.1
Class: buffer_luau
Description
Reads a string of length count from the buffer at the specified offset.
(string) = buffer.readstring(b,offset,count)
Parameters
b: (buffer) the buffer
offset: (number) offset from the beginning of the buffer memory, starting from 0
count: (number) length to read
Return values
Returns (string) the string from the buffer
Example
local str = "Hello Gideros!"
local b = buffer.fromstring(str)
local offset = 6
local count = buffer.len(b)-offset
print(buffer.readstring(b, offset, count))