INNER CODE UNIT · Rust

result

apollographql/apollo-mcp-server · crates/apollo-schema-index/src/lib.rs:121

    let mut result = String::with_capacity(text.len() * 2);
    let mut word_start = None;

    for (i, ch) in text.char_indices() {
        if ch.is_alphanumeric() || ch == '_' {
            if word_start.is_none() {
                word_start = Some(i);
            }
        } else {
            if let Some(start) = word_start {
                push_expanded_word(&mut result, &text[start..i]);
                word_start = None;
            }
            result.push(ch);
        }
    }

    if let Some(start) = word_start {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…