mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 21:40:58 +00:00
Remove scalars and graphemes from Str
This commit is contained in:
parent
65738acb26
commit
b48fa0698a
26 changed files with 140 additions and 12721 deletions
|
|
@ -9,10 +9,8 @@ pub enum LowLevel {
|
|||
StrJoinWith,
|
||||
StrIsEmpty,
|
||||
StrStartsWith,
|
||||
StrStartsWithScalar,
|
||||
StrEndsWith,
|
||||
StrSplit,
|
||||
StrCountGraphemes,
|
||||
StrCountUtf8Bytes,
|
||||
StrFromInt,
|
||||
StrFromUtf8Range,
|
||||
|
|
@ -23,15 +21,11 @@ pub enum LowLevel {
|
|||
StrTrimStart,
|
||||
StrTrimEnd,
|
||||
StrToNum,
|
||||
StrToScalars,
|
||||
StrGetUnsafe,
|
||||
StrSubstringUnsafe,
|
||||
StrReserve,
|
||||
StrAppendScalar,
|
||||
StrGetScalarUnsafe,
|
||||
StrGetCapacity,
|
||||
StrWithCapacity,
|
||||
StrGraphemes,
|
||||
StrReleaseExcessCapacity,
|
||||
ListLen,
|
||||
ListWithCapacity,
|
||||
|
|
@ -263,10 +257,8 @@ map_symbol_to_lowlevel! {
|
|||
StrJoinWith <= STR_JOIN_WITH;
|
||||
StrIsEmpty <= STR_IS_EMPTY;
|
||||
StrStartsWith <= STR_STARTS_WITH;
|
||||
StrStartsWithScalar <= STR_STARTS_WITH_SCALAR;
|
||||
StrEndsWith <= STR_ENDS_WITH;
|
||||
StrSplit <= STR_SPLIT;
|
||||
StrCountGraphemes <= STR_COUNT_GRAPHEMES;
|
||||
StrCountUtf8Bytes <= STR_COUNT_UTF8_BYTES;
|
||||
StrFromUtf8Range <= STR_FROM_UTF8_RANGE_LOWLEVEL;
|
||||
StrToUtf8 <= STR_TO_UTF8;
|
||||
|
|
@ -274,16 +266,12 @@ map_symbol_to_lowlevel! {
|
|||
StrTrim <= STR_TRIM;
|
||||
StrTrimStart <= STR_TRIM_START;
|
||||
StrTrimEnd <= STR_TRIM_END;
|
||||
StrToScalars <= STR_TO_SCALARS;
|
||||
StrGetUnsafe <= STR_GET_UNSAFE;
|
||||
StrSubstringUnsafe <= STR_SUBSTRING_UNSAFE;
|
||||
StrReserve <= STR_RESERVE;
|
||||
StrAppendScalar <= STR_APPEND_SCALAR_UNSAFE;
|
||||
StrGetScalarUnsafe <= STR_GET_SCALAR_UNSAFE;
|
||||
StrToNum <= STR_TO_NUM;
|
||||
StrGetCapacity <= STR_CAPACITY;
|
||||
StrWithCapacity <= STR_WITH_CAPACITY;
|
||||
StrGraphemes <= STR_GRAPHEMES;
|
||||
StrReleaseExcessCapacity <= STR_RELEASE_EXCESS_CAPACITY;
|
||||
ListLen <= LIST_LEN;
|
||||
ListGetCapacity <= LIST_CAPACITY;
|
||||
|
|
|
|||
|
|
@ -1297,14 +1297,14 @@ define_builtins! {
|
|||
3 STR_CONCAT: "concat"
|
||||
4 STR_JOIN_WITH: "joinWith"
|
||||
5 STR_SPLIT: "split"
|
||||
6 STR_COUNT_GRAPHEMES: "countGraphemes"
|
||||
6 STR_WITH_PREFIX: "withPrefix"
|
||||
7 STR_STARTS_WITH: "startsWith"
|
||||
8 STR_ENDS_WITH: "endsWith"
|
||||
9 STR_FROM_UTF8: "fromUtf8"
|
||||
10 STR_UT8_PROBLEM: "Utf8Problem" // the Utf8Problem type alias
|
||||
11 STR_UT8_BYTE_PROBLEM: "Utf8ByteProblem" // the Utf8ByteProblem type alias
|
||||
12 STR_TO_UTF8: "toUtf8"
|
||||
13 STR_STARTS_WITH_SCALAR: "startsWithScalar"
|
||||
13 STR_WALK_UTF8: "walkUtf8"
|
||||
14 STR_ALIAS_ANALYSIS_STATIC: "#aliasAnalysisStatic" // string with the static lifetime
|
||||
15 STR_FROM_UTF8_RANGE: "fromUtf8Range"
|
||||
16 STR_REPEAT: "repeat"
|
||||
|
|
@ -1325,7 +1325,7 @@ define_builtins! {
|
|||
31 STR_TO_I16: "toI16"
|
||||
32 STR_TO_U8: "toU8"
|
||||
33 STR_TO_I8: "toI8"
|
||||
34 STR_TO_SCALARS: "toScalars"
|
||||
34 STR_CONTAINS: "contains"
|
||||
35 STR_GET_UNSAFE: "getUnsafe"
|
||||
36 STR_COUNT_UTF8_BYTES: "countUtf8Bytes"
|
||||
37 STR_SUBSTRING_UNSAFE: "substringUnsafe"
|
||||
|
|
@ -1333,24 +1333,14 @@ define_builtins! {
|
|||
39 STR_SPLIT_LAST: "splitLast"
|
||||
40 STR_WALK_UTF8_WITH_INDEX: "walkUtf8WithIndex"
|
||||
41 STR_RESERVE: "reserve"
|
||||
42 STR_APPEND_SCALAR_UNSAFE: "appendScalarUnsafe"
|
||||
43 STR_APPEND_SCALAR: "appendScalar"
|
||||
44 STR_GET_SCALAR_UNSAFE: "getScalarUnsafe"
|
||||
45 STR_WALK_SCALARS: "walkScalars"
|
||||
46 STR_WALK_SCALARS_UNTIL: "walkScalarsUntil"
|
||||
47 STR_TO_NUM: "strToNum"
|
||||
48 STR_FROM_UTF8_RANGE_LOWLEVEL: "fromUtf8RangeLowlevel"
|
||||
49 STR_CAPACITY: "capacity"
|
||||
50 STR_REPLACE_EACH: "replaceEach"
|
||||
51 STR_REPLACE_FIRST: "replaceFirst"
|
||||
52 STR_REPLACE_LAST: "replaceLast"
|
||||
53 STR_WITH_CAPACITY: "withCapacity"
|
||||
54 STR_WITH_PREFIX: "withPrefix"
|
||||
55 STR_GRAPHEMES: "graphemes"
|
||||
56 STR_IS_VALID_SCALAR: "isValidScalar"
|
||||
57 STR_RELEASE_EXCESS_CAPACITY: "releaseExcessCapacity"
|
||||
58 STR_WALK_UTF8: "walkUtf8"
|
||||
59 STR_CONTAINS: "contains"
|
||||
42 STR_TO_NUM: "strToNum"
|
||||
43 STR_FROM_UTF8_RANGE_LOWLEVEL: "fromUtf8RangeLowlevel"
|
||||
44 STR_CAPACITY: "capacity"
|
||||
45 STR_REPLACE_EACH: "replaceEach"
|
||||
46 STR_REPLACE_FIRST: "replaceFirst"
|
||||
47 STR_REPLACE_LAST: "replaceLast"
|
||||
48 STR_WITH_CAPACITY: "withCapacity"
|
||||
49 STR_RELEASE_EXCESS_CAPACITY: "releaseExcessCapacity"
|
||||
}
|
||||
6 LIST: "List" => {
|
||||
0 LIST_LIST: "List" exposed_apply_type=true // the List.List type alias
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue