INNER CODE UNIT · Rust
push_expanded_word
apollographql/apollo-mcp-server · crates/apollo-schema-index/src/lib.rs:148
fn push_expanded_word(out: &mut String, word: &str) {
let mut prev_underscore = false;
for ch in word.to_snake_case().chars() {
if ch == '_' {
if !prev_underscore {
out.push(' ');
}
prev_underscore = true;
} else {
out.push(ch);
prev_underscore = false;
}
}
}
#[derive(Clone)]
pub struct SchemaIndex {
inner: Index,