Rename Str.toBytes to Str.toUtf8

This commit is contained in:
Richard Feldman 2021-08-07 21:57:48 -04:00
parent 23e11ca946
commit 2a616103c6
16 changed files with 33 additions and 33 deletions

View file

@ -235,8 +235,8 @@ pub fn str_from_int<'a, 'ctx, 'env>(
call_bitcode_fn(env, &[int], bitcode::STR_FROM_INT)
}
/// Str.toBytes : Str -> List U8
pub fn str_to_bytes<'a, 'ctx, 'env>(
/// Str.toUtf8 : Str -> List U8
pub fn str_to_utf8<'a, 'ctx, 'env>(
env: &Env<'a, 'ctx, 'env>,
original_wrapper: StructValue<'ctx>,
) -> BasicValueEnum<'ctx> {
@ -244,10 +244,10 @@ pub fn str_to_bytes<'a, 'ctx, 'env>(
env.builder,
original_wrapper.into(),
env.context.i128_type().into(),
"to_bytes",
"to_utf8",
);
call_bitcode_fn_returns_list(env, &[string], bitcode::STR_TO_BYTES)
call_bitcode_fn_returns_list(env, &[string], bitcode::STR_TO_UTF8)
}
/// Str.fromUtf8 : List U8 -> { a : Bool, b : Str, c : Nat, d : I8 }