<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.gideros.rocks/index.php?action=history&amp;feed=atom&amp;title=Buffer.fill</id>
	<title>Buffer.fill - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.gideros.rocks/index.php?action=history&amp;feed=atom&amp;title=Buffer.fill"/>
	<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Buffer.fill&amp;action=history"/>
	<updated>2026-11-17T23:01:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.gideros.rocks/index.php?title=Buffer.fill&amp;diff=24243&amp;oldid=prev</id>
		<title>MoKaLux: Created page with &quot;__NOTOC__ &#039;&#039;&#039;Available since:&#039;&#039;&#039; Gideros 2025.1&lt;br/&gt; &#039;&#039;&#039;Class:&#039;&#039;&#039; buffer_luau&lt;br/&gt;  === Description === Sets &#039;&#039;count&#039;&#039; bytes in the &#039;&#039;buffer&#039;&#039; starting at the specified &#039;&#039;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Buffer.fill&amp;diff=24243&amp;oldid=prev"/>
		<updated>2025-02-06T03:55:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ &amp;#039;&amp;#039;&amp;#039;Available since:&amp;#039;&amp;#039;&amp;#039; Gideros 2025.1&amp;lt;br/&amp;gt; &amp;#039;&amp;#039;&amp;#039;Class:&amp;#039;&amp;#039;&amp;#039; &lt;a href=&quot;/index.php/Buffer_luau&quot; title=&quot;Buffer luau&quot;&gt;buffer_luau&lt;/a&gt;&amp;lt;br/&amp;gt;  === Description === Sets &amp;#039;&amp;#039;count&amp;#039;&amp;#039; bytes in the &amp;#039;&amp;#039;buffer&amp;#039;&amp;#039; starting at the specified &amp;#039;&amp;#039;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Available since:&amp;#039;&amp;#039;&amp;#039; Gideros 2025.1&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Class:&amp;#039;&amp;#039;&amp;#039; [[buffer_luau]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
Sets &amp;#039;&amp;#039;count&amp;#039;&amp;#039; bytes in the &amp;#039;&amp;#039;buffer&amp;#039;&amp;#039; starting at the specified &amp;#039;&amp;#039;offset&amp;#039;&amp;#039; to &amp;#039;&amp;#039;value&amp;#039;&amp;#039;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
buffer.fill(b,offset,value,count)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;b&amp;#039;&amp;#039;&amp;#039;: (buffer) buffer to write the data into&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;offset&amp;#039;&amp;#039;&amp;#039;: (number) offset from the beginning of the buffer memory, starting from 0&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;value&amp;#039;&amp;#039;&amp;#039;: (number) an integer number in range [0, 255]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;count&amp;#039;&amp;#039;&amp;#039;: (number) number of bytes to write &amp;#039;&amp;#039;&amp;#039;optional&amp;#039;&amp;#039;&amp;#039; if omitted, all bytes after the specified offset are set&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local str = &amp;quot;Hello Gideros!&amp;quot;&lt;br /&gt;
local b = buffer.fromstring(str)&lt;br /&gt;
local offset, value, count = 0, 8, 5&lt;br /&gt;
buffer.fill(b, offset, value, count)&lt;br /&gt;
print(buffer.tostring(b))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{buffer_luau}}&lt;/div&gt;</summary>
		<author><name>MoKaLux</name></author>
	</entry>
</feed>