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 [[Special:MyLanguage/Buffer|Buffer]] object, extending it if necessary.
+
Sets data in a '''Buffer''' object, extending it if necessary.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(number) = Buffer:set(data,offset)
 
(number) = Buffer:set(data,offset)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===
'''data''': (string) Data to set in the buffer
+
'''data''': (string) data to set in the buffer<br/>
'''offset''': (number) Offset to write the data at. '''optional'''
+
'''offset''': (number) offset to write the data at '''optional'''<br/>
  
 
=== Return values ===
 
=== Return values ===
'''Returns''' (number) New buffer size.<br/>
+
'''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