mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-13 23:36:29 +00:00
Str.walkScalars
This commit is contained in:
parent
1de9270ecf
commit
6d7c329698
15 changed files with 109 additions and 2 deletions
|
@ -5371,6 +5371,14 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
let string = load_symbol(scope, &args[0]);
|
||||
call_bitcode_fn(env, &[string], bitcode::STR_COUNT_GRAPEHEME_CLUSTERS)
|
||||
}
|
||||
StrGetScalarUnsafe => {
|
||||
// Str.getScalarUnsafe : Str, Nat -> { bytesParsed : Nat, scalar : U32 }
|
||||
debug_assert_eq!(args.len(), 2);
|
||||
|
||||
let string = load_symbol(scope, &args[0]);
|
||||
let index = load_symbol(scope, &args[1]);
|
||||
call_bitcode_fn(env, &[string, index], bitcode::STR_GET_SCALAR_UNSAFE)
|
||||
}
|
||||
StrCountUtf8Bytes => {
|
||||
// Str.countGraphemes : Str -> Nat
|
||||
debug_assert_eq!(args.len(), 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue