str.appendScalar

This commit is contained in:
Folkert 2022-07-04 16:27:04 +02:00
parent ab721dd3c1
commit 9c41a4d442
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
10 changed files with 53 additions and 1 deletions

View file

@ -5364,6 +5364,14 @@ fn run_low_level<'a, 'ctx, 'env>(
let capacity = load_symbol(scope, &args[1]);
call_str_bitcode_fn(env, &[string, capacity], bitcode::STR_RESERVE)
}
StrAppendScalar => {
// Str.appendScalar : Str, U32 -> 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_APPEND_SCALAR)
}
StrTrim => {
// Str.trim : Str -> Str
debug_assert_eq!(args.len(), 1);