Buffer.extract

From GiderosMobile
Revision as of 08:29, 6 February 2025 by MoKaLux (talk | contribs) (wip)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2025.2
Class: buffer_luau

Description

Extracts from a buffer.

(any) = buffer.extract(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 extract

Return values

Returns (any) the extracted value from the buffer

Example

local mystr = "Hello Gideros!"
local b2 = buffer.fromstring(mystr)
print(buffer.extract(b2, 1, 5))