mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-19 01:59:48 +00:00
str-graphemes: rework and add some zig tests
- rework strGraphemes() to use a mutable slice and keep track of just `last_codepoint_len`. - add zig tests for empty string, ascii, utf8, ascii+utf8+emoji
This commit is contained in:
parent
df7e4eea7e
commit
c2dbed2ff5
4 changed files with 65 additions and 80 deletions
|
@ -145,7 +145,7 @@ comptime {
|
|||
exportStrFn(str.strTrimRight, "trim_right");
|
||||
exportStrFn(str.strCloneTo, "clone_to");
|
||||
exportStrFn(str.withCapacity, "with_capacity");
|
||||
exportStrFn(str.strGraphemes, "str_graphemes");
|
||||
exportStrFn(str.strGraphemes, "graphemes");
|
||||
|
||||
inline for (INTEGERS) |T| {
|
||||
str.exportFromInt(T, ROC_BUILTINS ++ "." ++ STR ++ ".from_int.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue