add Str.countBytes

This commit is contained in:
Folkert 2022-07-03 14:16:47 +02:00
parent 1f943a5452
commit 3cd56c3184
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
9 changed files with 25 additions and 17 deletions

View file

@ -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),