MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / parse_include_arg

Function parse_include_arg

native/shared/src/renderer/shader_include.rs:124–133  ·  view source on GitHub ↗
(rest: &str)

Source from the content-addressed store, hash-verified

122}
123
124fn parse_include_arg(rest: &str) -> Option<String> {
125 let rest = rest.trim();
126 let first = rest.chars().next()?;
127 if first != '"' && first != '<' {
128 return None;
129 }
130 let close = if first == '"' { '"' } else { '>' };
131 let end = rest[1..].find(close)? + 1;
132 Some(rest[1..end].to_string())
133}
134
135#[cfg(test)]
136mod tests {

Callers 1

expandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected