File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -440,10 +440,13 @@ object representing the successful match, or C<Any> otherwise.
440
440
= head2 routine substr
441
441
442
442
multi sub substr(Str:D $s, Int:D $from, Int:D $chars = $s.chars - $from) returns Str:D
443
+ multi sub substr(Str:D $s, Range $from-to) returns Str:D
443
444
multi method substr(Str:D $s: Int:D $from, Int:D $chars = $s.chars - $from) returns Str:D
445
+ multi method substr(Str:D $s: Range $from-to) returns Str:D
444
446
445
447
Returns a part of the string, starting from the character with index C < $from >
446
- (where the first character has index 0) and with length C < $chars > .
448
+ (where the first character has index 0) and with length C < $chars > . If a range is
449
+ specified, its first and last indices are used to determine the size of the substring.
447
450
448
451
Examples:
449
452
You can’t perform that action at this time.
0 commit comments