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 eb0ddad commit 853b935Copy full SHA for 853b935
1 file changed
docs/reference/buffer/write.md
@@ -0,0 +1,20 @@
1
+## write
2
+Copy contents of the source buffer into the destination buffer at the specified byte offset (dstOffset).
3
+
4
+``` sig
5
+ Buffer.create(null).write(null, null);
6
+```
7
8
+## Parameters
9
+**dstOffset:** The byte offset in the destination buffer where the contents of the source buffer will be written.
10
+**src:** The source buffer that contain contents will be copied into the destination buffer.
11
12
+## Example
13
14
+Create a new buffer that copies 2 offsets of the original buffer.
15
+``` ts
16
+ const buf = Buffer.create(30);
17
+ const newBuf = Buffer.create(2);
18
+ newBuf.write(0, newBuf);
19
+ newBuf.write(1, newBuf);
20
0 commit comments