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 4fd9dad commit abefe1aCopy full SHA for abefe1a
lib/Buf.pod
@@ -37,4 +37,14 @@ Returns the number of elements of the buffer.
37
38
Applies an encoding to turn the buffer into a C<Str>.
39
40
+=head2 subbuf
41
+
42
+ method subbuf(Int $from, Int $len = self.elems) returns Buf:D
43
44
+Extracts a part of the invocant buffer, statrting from the index with
45
+elements C<$from>, and taking C<$len> elements (or less if the buffer is
46
+shorter), and creates a new buffer as the result.
47
48
+ say Buf.new(1..10).subbuf(2, 4); # Buf:0x<03 04 05 06>
49
50
=end pod
0 commit comments