Skip to content

Commit 012b029

Browse files
committed
Add doc for Str:D.comb(Int:D)
1 parent 909ac44 commit 012b029

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/Type/Str.pod

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,12 @@ Examples:
219219
220220
multi sub comb(Str:D $matcher, Str:D $input, $limit = Inf)
221221
multi sub comb(Regex:D $matcher, Str:D $input, $limit = Inf, Bool :$match)
222+
multi sub comb(Int:D $size, Str:D $input, $limit = Inf)
223+
222224
multi method comb(Str:D $input:)
223225
multi method comb(Str:D $input: Str:D $matcher, $limit = Inf)
224226
multi method comb(Str:D $input: Regex:D $matcher, $limit = Inf, Bool :$match)
227+
multi method comb(Str:D $input: Int:D $size, $limit = Inf)
225228
226229
Searches for C<$matcher> in C<$input> and returns a list of all matches
227230
(as C<Str> by default, or as L<Match> if C<$match> is True), limited to at most
@@ -237,6 +240,9 @@ Examples:
237240
comb(/\w/, "a;b;c", 2).perl; # ("a", "b").list
238241
comb(/\w\;\w/, "a;b;c", 2).perl; # ("a;b",).list
239242
243+
If the matcher is an integer value, it is considered to be a matcher that
244+
is similar to / . ** matcher /, but which is about 30x faster.
245+
240246
=head2 routine lines
241247
242248
multi sub lines(Str:D $input, $limit = Inf) returns Positional

0 commit comments

Comments
 (0)