MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / to_uppercase

Function to_uppercase

aiscript-vm/src/builtins/string.rs:55–63  ·  view source on GitHub ↗

Case conversion

(
    mc: &'gc Mutation<'gc>,
    receiver: Value<'gc>,
    _args: Vec<Value<'gc>>,
)

Source from the content-addressed store, hash-verified

53
54// Case conversion
55fn to_uppercase<'gc>(
56 mc: &'gc Mutation<'gc>,
57 receiver: Value<'gc>,
58 _args: Vec<Value<'gc>>,
59) -> Result<Value<'gc>, VmError> {
60 let upper = receiver.as_string_value()?.as_str().to_uppercase();
61 // Ok(Value::String(mc.intern(upper.as_bytes())))
62 Ok(Value::IoString(Gc::new(mc, upper)))
63}
64
65fn to_lowercase<'gc>(
66 mc: &'gc Mutation<'gc>,

Callers

nothing calls this directly

Calls 2

as_string_valueMethod · 0.80
as_strMethod · 0.45

Tested by

no test coverage detected