Commit 10f0bc0
committed
Don't mess with the original in String::substring
Before, substring would (temporarily) add a \0 in the original string at
the end of the substring, so the substring could be copied into a new
String object. However, now that the String::copy() method can work with
non-nul-terminated strings (by passing an explicit length), this trick
is not needed and we can just call the copy method instead.1 parent 581941e commit 10f0bc0
1 file changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
| 619 | + | |
623 | 620 | | |
624 | 621 | | |
625 | 622 | | |
| |||
0 commit comments