add Str.getUnsafe

This commit is contained in:
Folkert 2022-07-03 13:44:14 +02:00
parent 2a82d24847
commit 1f943a5452
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
8 changed files with 28 additions and 53 deletions

View file

@ -24,6 +24,7 @@ pub enum LowLevel {
StrTrimRight,
StrToNum,
StrToScalars,
StrGetUnsafe,
ListLen,
ListWithCapacity,
ListGetUnsafe,
@ -167,6 +168,7 @@ impl LowLevelWrapperType {
match symbol {
Symbol::STR_CONCAT => CanBeReplacedBy(StrConcat),
Symbol::STR_GET_UNSAFE => CanBeReplacedBy(StrGetUnsafe),
Symbol::STR_TO_SCALARS => CanBeReplacedBy(StrToScalars),
Symbol::STR_JOIN_WITH => CanBeReplacedBy(StrJoinWith),
Symbol::STR_IS_EMPTY => CanBeReplacedBy(StrIsEmpty),

View file

@ -1190,6 +1190,7 @@ define_builtins! {
32 STR_TO_U8: "toU8"
33 STR_TO_I8: "toI8"
34 STR_TO_SCALARS: "toScalars"
35 STR_GET_UNSAFE: "getUnsafe"
}
5 LIST: "List" => {
0 LIST_LIST: "List" imported // the List.List type alias