Skip to content

Commit e79d237

Browse files
committed
Clarify return of Str.subst-mutate with multi-match options
Rakudo fix: rakudo/rakudo@77794a28aa rakudo/rakudo@e0d39321e1 Spec: Raku/roast@c537763529 Raku/roast@8c358cfc87
1 parent 9a718ea commit e79d237

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/Type/Str.pod6

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -911,9 +911,10 @@ regex, not the C<subst> method call.
911911
Where L<subst> returns the modified string and leaves the original
912912
unchanged, it is possible to mutate the original string by using
913913
C<subst-mutate>. If the match is successful, the method returns a L<Match>
914-
object representing the successful match; if C<:g> (or C<:global>) argument
915-
is used, returns a L<List> of L<Match> objects. If no matches happen,
916-
returns L<Nil>.
914+
object representing the successful match, otherwise returns L<Nil>. If C<:nth>
915+
(or one of its aliases) with L<Iterable> value, C<:g>, C<:global>, or C<:x>
916+
arguments are used, returns a L<List> of L<Match> objects, or an empty L<List>
917+
if no matches occured.
917918
918919
my $some-string = "Some foo";
919920
my $match = $some-string.subst-mutate(/foo/, "string");

0 commit comments

Comments
 (0)