We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 369e845 commit 87d6b0dCopy full SHA for 87d6b0d
docs/Runtime Environment/Buffer.md
@@ -0,0 +1,38 @@
1
+The buffer class — available via `require` — is a fast intermediate storage for incrementally-constructed strings.
2
+
3
+---
4
+### `buffer.new`
5
6
+Creates a new buffer instance.
7
8
9
+### `buffer.append`
10
11
+Appends a string to a buffer instance.
12
13
+#### Parameters
14
15
+1. The buffer instance.
16
+2. The string to append.
17
18
19
+### `buffer.tostring`, `__tostring`
20
21
+Converts the buffer into a string.
22
23
24
25
26
27
+#### Returns
28
29
+A string.
30
31
+```pluto
32
+local buffer = require "pluto:buffer"
33
34
+local buff = new buffer()
35
+buff:append("Hello,")
36
+buff:append(" world!")
37
+print(buff) --> Hello, world!
38
+```
0 commit comments