<?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.resize</id>
	<title>Buffer.resize - 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.resize"/>
	<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Buffer.resize&amp;action=history"/>
	<updated>2026-11-17T23:01:36Z</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.resize&amp;diff=24257&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 === Resizes the buffer and creates a new one. &lt;syntaxhighlight lang=&quot;lu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Buffer.resize&amp;diff=24257&amp;oldid=prev"/>
		<updated>2025-02-06T06:48:17Z</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 === Resizes the buffer and creates a new one. &amp;lt;syntaxhighlight lang=&amp;quot;lu...&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;
Resizes the buffer and creates a new one.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
(buffer) = buffer.resize(b,newSize,offset)&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) the buffer&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;newSize&amp;#039;&amp;#039;&amp;#039;: (number) the new buffer size&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;#039;&amp;#039;&amp;#039;optional&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Return values ===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039; (buffer) a new buffer with the new size&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local b = buffer.create(16)&lt;br /&gt;
b = buffer.resize(b, 48, 16)&lt;br /&gt;
print(buffer.len(b))&lt;br /&gt;
&lt;br /&gt;
local mystr = &amp;quot;Hello Gideros!&amp;quot;&lt;br /&gt;
local b2 = buffer.fromstring(mystr)&lt;br /&gt;
b2 = buffer.resize(b2, 48, 0)&lt;br /&gt;
print(buffer.tostring(b2))&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>