mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
add Str.countBytes
This commit is contained in:
parent
1f943a5452
commit
3cd56c3184
9 changed files with 25 additions and 17 deletions
|
@ -13,6 +13,7 @@ pub enum LowLevel {
|
|||
StrEndsWith,
|
||||
StrSplit,
|
||||
StrCountGraphemes,
|
||||
StrCountBytes,
|
||||
StrFromInt,
|
||||
StrFromUtf8,
|
||||
StrFromUtf8Range,
|
||||
|
@ -177,6 +178,7 @@ impl LowLevelWrapperType {
|
|||
Symbol::STR_ENDS_WITH => CanBeReplacedBy(StrEndsWith),
|
||||
Symbol::STR_SPLIT => CanBeReplacedBy(StrSplit),
|
||||
Symbol::STR_COUNT_GRAPHEMES => CanBeReplacedBy(StrCountGraphemes),
|
||||
Symbol::STR_COUNT_BYTES => CanBeReplacedBy(StrCountBytes),
|
||||
Symbol::STR_FROM_UTF8 => WrapperIsRequired,
|
||||
Symbol::STR_FROM_UTF8_RANGE => WrapperIsRequired,
|
||||
Symbol::STR_TO_UTF8 => CanBeReplacedBy(StrToUtf8),
|
||||
|
|
|
@ -1191,6 +1191,7 @@ define_builtins! {
|
|||
33 STR_TO_I8: "toI8"
|
||||
34 STR_TO_SCALARS: "toScalars"
|
||||
35 STR_GET_UNSAFE: "getUnsafe"
|
||||
36 STR_COUNT_BYTES: "countBytes"
|
||||
}
|
||||
5 LIST: "List" => {
|
||||
0 LIST_LIST: "List" imported // the List.List type alias
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue