mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-20 10:39:48 +00:00
Merge pull request #3365 from rtfeldman/to-scalars
Add Str.toScalars builtin
This commit is contained in:
commit
75b4b3a206
17 changed files with 460 additions and 20 deletions
|
@ -5310,6 +5310,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_list_bitcode_fn(env, &[string], bitcode::STR_TO_SCALARS)
|
||||
}
|
||||
StrStartsWith => {
|
||||
// Str.startsWith : Str, Str -> Bool
|
||||
debug_assert_eq!(args.len(), 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue