Difference between revisions of "Buffer:set"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
=== Description === | === Description === | ||
− | Sets data in a | + | Sets data in a '''Buffer''' object, extending it if necessary. |
− | < | + | <syntaxhighlight lang="lua"> |
(number) = Buffer:set(data,offset) | (number) = Buffer:set(data,offset) | ||
− | </ | + | </syntaxhighlight> |
=== Parameters === | === Parameters === | ||
− | '''data''': (string) | + | '''data''': (string) data to set in the buffer<br/> |
− | '''offset''': (number) | + | '''offset''': (number) offset to write the data at '''optional'''<br/> |
=== Return values === | === Return values === | ||
− | '''Returns''' (number) | + | '''Returns''' (number) new buffer size<br/> |
{{Buffer}} | {{Buffer}} |
Latest revision as of 14:26, 13 July 2023
Available since: Gideros 2020.2
Class: Buffer
Description
Sets data in a Buffer object, extending it if necessary.
(number) = Buffer:set(data,offset)
Parameters
data: (string) data to set in the buffer
offset: (number) offset to write the data at optional
Return values
Returns (number) new buffer size