Merge pull request #3365 from rtfeldman/to-scalars

Add Str.toScalars builtin
This commit is contained in:
Folkert de Vries 2022-07-02 23:04:28 +02:00 committed by GitHub
commit 75b4b3a206
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 460 additions and 20 deletions

View file

@ -23,6 +23,7 @@ pub enum LowLevel {
StrTrimLeft,
StrTrimRight,
StrToNum,
StrToScalars,
ListLen,
ListWithCapacity,
ListGetUnsafe,
@ -184,6 +185,7 @@ impl LowLevelWrapperType {
match symbol {
Symbol::STR_CONCAT => CanBeReplacedBy(StrConcat),
Symbol::STR_TO_SCALARS => CanBeReplacedBy(StrToScalars),
Symbol::STR_JOIN_WITH => CanBeReplacedBy(StrJoinWith),
Symbol::STR_IS_EMPTY => CanBeReplacedBy(StrIsEmpty),
Symbol::STR_STARTS_WITH => CanBeReplacedBy(StrStartsWith),

View file

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