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

Method as_str

aiscript-vm/src/string/mod.rs:16–21  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

14
15impl<'gc> StringValue<'gc> {
16 pub fn as_str(&self) -> &str {
17 match self {
18 StringValue::Interned(s) => s.to_str().unwrap(),
19 StringValue::Dynamic(s) => s,
20 }
21 }
22
23 // Convert back to Value based on heuristics
24 pub fn into_value(self, ctx: Context<'gc>, should_intern: bool) -> Value<'gc> {

Callers 15

handle_tool_callMethod · 0.45
response_to_objectFunction · 0.45
authority_urlFunction · 0.45
to_uppercaseFunction · 0.45
to_lowercaseFunction · 0.45
trimFunction · 0.45
trim_startFunction · 0.45
trim_endFunction · 0.45
index_ofFunction · 0.45
last_index_ofFunction · 0.45
splitFunction · 0.45
joinFunction · 0.45

Calls 1

to_strMethod · 0.80

Tested by

no test coverage detected