MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / capitalize

Function capitalize

atomic-repository/src/ai/mod.rs:523–529  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

521
522#[cfg(test)]
523fn capitalize(s: &str) -> String {
524 let mut c = s.chars();
525 match c.next() {
526 None => String::new(),
527 Some(f) => f.to_uppercase().collect::<String>() + c.as_str(),
528 }
529}
530
531// ── Errors ──────────────────────────────────────────────────────
532

Callers

nothing calls this directly

Calls 2

nextMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected