MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / to_lowercase

Function to_lowercase

aiscript-vm/src/builtins/string.rs:65–73  ·  view source on GitHub ↗
(
    mc: &'gc Mutation<'gc>,
    receiver: Value<'gc>,
    _args: Vec<Value<'gc>>,
)

Source from the content-addressed store, hash-verified

63}
64
65fn to_lowercase<'gc>(
66 mc: &'gc Mutation<'gc>,
67 receiver: Value<'gc>,
68 _args: Vec<Value<'gc>>,
69) -> Result<Value<'gc>, VmError> {
70 let lower = receiver.as_string_value()?.as_str().to_lowercase();
71 // Ok(Value::String(mc.intern(lower.as_bytes())))
72 Ok(Value::IoString(Gc::new(mc, lower)))
73}
74
75// Trim functions
76fn trim<'gc>(

Callers

nothing calls this directly

Calls 2

as_string_valueMethod · 0.80
as_strMethod · 0.45

Tested by

no test coverage detected