mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Str.reserve
This commit is contained in:
parent
f7b8094dfb
commit
ab721dd3c1
10 changed files with 32 additions and 0 deletions
|
@ -5356,6 +5356,14 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
let length = load_symbol(scope, &args[2]);
|
||||
call_str_bitcode_fn(env, &[string, start, length], bitcode::STR_SUBSTRING_UNSAFE)
|
||||
}
|
||||
StrReserve => {
|
||||
// Str.reserve : Str, Nat -> Str
|
||||
debug_assert_eq!(args.len(), 2);
|
||||
|
||||
let string = load_symbol(scope, &args[0]);
|
||||
let capacity = load_symbol(scope, &args[1]);
|
||||
call_str_bitcode_fn(env, &[string, capacity], bitcode::STR_RESERVE)
|
||||
}
|
||||
StrTrim => {
|
||||
// Str.trim : Str -> Str
|
||||
debug_assert_eq!(args.len(), 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue