Commit 3e9e0bd
committed
BREAKING CHANGE: String::at and StringView::at now return UInt16
- String::at and StringView::at now return UInt16 instead of Int
- These methods are now the primary interface for UTF-16 code unit access
- code_unit_at is now an alias for at (previously it was the other way around)
- The old Int-returning behavior is preserved in String::charcode_at (deprecated)
This change aligns the API with the actual UTF-16 representation of strings
and makes the type system more accurate.1 parent 3786d58 commit 3e9e0bd
File tree
4 files changed
+18
-25
lines changed- builtin
4 files changed
+18
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1558 | 1558 | | |
1559 | 1559 | | |
1560 | 1560 | | |
1561 | | - | |
1562 | | - | |
1563 | 1561 | | |
1564 | | - | |
| 1562 | + | |
1565 | 1563 | | |
1566 | 1564 | | |
1567 | 1565 | | |
1568 | 1566 | | |
1569 | 1567 | | |
1570 | | - | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
1571 | 1571 | | |
1572 | 1572 | | |
1573 | 1573 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
687 | | - | |
688 | | - | |
| 686 | + | |
| 687 | + | |
689 | 688 | | |
690 | 689 | | |
691 | 690 | | |
692 | 691 | | |
693 | | - | |
| 692 | + | |
| 693 | + | |
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
| |||
955 | 955 | | |
956 | 956 | | |
957 | 957 | | |
958 | | - | |
959 | | - | |
| 958 | + | |
| 959 | + | |
960 | 960 | | |
961 | 961 | | |
962 | 962 | | |
963 | | - | |
964 | 963 | | |
965 | 964 | | |
966 | 965 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 30 | | |
44 | 31 | | |
45 | 32 | | |
46 | 33 | | |
47 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
48 | 37 | | |
49 | 38 | | |
50 | 39 | | |
| |||
0 commit comments