Skip to content

Commit 94cf5bb

Browse files
committed
Document substr(Range) coerces endpoints to Int
1 parent 87e6a7b commit 94cf5bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/Type/Str.pod6

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,8 @@ multi-match options like C<:g> are used).
949949
multi method substr(Str:D $s: Range $from-to --> Str:D)
950950
951951
Returns a substring of the original string, between the indices specified by
952-
C<$from-to>'s endpoints or from index C<$from> and of length C<$chars>.
952+
C<$from-to>'s endpoints (coerced to L<Int>) or from index C<$from> and of
953+
length C<$chars>.
953954
954955
Both C<$from> and C<$chars> can be specified as L<Callable>, which will be
955956
invoked with the L<length|/routine/chars> of the original string and the

0 commit comments

Comments
 (0)