Difference between revisions of "Buffer luau"
From GiderosMobile
(wip) |
(wip) |
||
Line 24: | Line 24: | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== Methods === | === Methods === | ||
− | [[ | + | [[buffer.create]] ''creates a buffer of the requested size with all bytes initialized to 0''<br/><!--GIDEROSMTD:buffer.create(size) creates a buffer of the requested size with all bytes initialized to 0--> |
[[collectgarbage]] ''opts: stop, restart, collect, count, step, setpause, setstepmul''<br/><!--GIDEROSMTD:collectgarbage(opt,arg) opts: stop, restart, collect, count, step, setpause, setstepmul--> | [[collectgarbage]] ''opts: stop, restart, collect, count, step, setpause, setstepmul''<br/><!--GIDEROSMTD:collectgarbage(opt,arg) opts: stop, restart, collect, count, step, setpause, setstepmul--> | ||
[[ColorValue]] ''sets a Color the r,g,b,a channel values''<br/><!--GIDEROSMTD:ColorValue(r,g,b,a) sets a Color the r,g,b,a channel values--> | [[ColorValue]] ''sets a Color the r,g,b,a channel values''<br/><!--GIDEROSMTD:ColorValue(r,g,b,a) sets a Color the r,g,b,a channel values--> |
Revision as of 23:39, 5 February 2025
Supported platforms:
Available since: Gideros 2025.1
Description
This is the Luau buffer library implemented in Gideros.
Example
-- creates a buffer initialized to the contents of the string
local str = "Hello Gideros!"
b = buffer.fromstring(str)
print(buffer.len(b))
-- returns the buffer data as a string
print(buffer.tostring(b))
Reference
https://luau.org/library#buffer-library
https://create.roblox.com/docs/reference/engine/libraries/buffer
Methodsbuffer.create creates a buffer of the requested size with all bytes initialized to 0 |
EventsConstants |