builtin(str): implement Str.graphemes

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
This commit is contained in:
Prajwal S N 2022-10-10 20:51:25 +05:30 committed by Travis Staloch
parent b6a282b0ce
commit df7e4eea7e
No known key found for this signature in database
GPG key ID: 9726F5C64475E635
10 changed files with 67 additions and 3 deletions

View file

@ -31,6 +31,7 @@ pub enum LowLevel {
StrGetScalarUnsafe,
StrGetCapacity,
StrWithCapacity,
StrGraphemes,
ListLen,
ListWithCapacity,
ListReserve,
@ -250,6 +251,7 @@ map_symbol_to_lowlevel! {
StrToNum <= STR_TO_NUM,
StrGetCapacity <= STR_CAPACITY,
StrWithCapacity <= STR_WITH_CAPACITY,
StrGraphemes <= STR_GRAPHEMES,
ListLen <= LIST_LEN,
ListGetCapacity <= LIST_CAPACITY,
ListWithCapacity <= LIST_WITH_CAPACITY,

View file

@ -1318,6 +1318,7 @@ define_builtins! {
52 STR_REPLACE_LAST: "replaceLast"
53 STR_WITH_CAPACITY: "withCapacity"
54 STR_WITH_PREFIX: "withPrefix"
55 STR_GRAPHEMES: "graphemes"
}
6 LIST: "List" => {
0 LIST_LIST: "List" exposed_apply_type=true // the List.List type alias