Add Str.toScalars builtin

This commit is contained in:
Richard Feldman 2022-07-01 22:34:17 -04:00
parent b1fe76adbf
commit acb7cf99e1
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
11 changed files with 73 additions and 3 deletions

View file

@ -5415,6 +5415,14 @@ fn run_low_level<'a, 'ctx, 'env>(
call_str_bitcode_fn(env, &[list.into(), string], bitcode::STR_JOIN_WITH)
}
StrToScalars => {
// Str.toScalars : Str -> List U32
debug_assert_eq!(args.len(), 1);
let string = load_symbol(scope, &args[0]);
call_str_bitcode_fn(env, &[string], bitcode::STR_TO_SCALARS)
}
StrStartsWith => {
// Str.startsWith : Str, Str -> Bool
debug_assert_eq!(args.len(), 2);