MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / ascii_capitalize

Function ascii_capitalize

04_strings_unicode/rust/uppercase.rs:11–17  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

9}
10
11fn ascii_capitalize(s: &str) -> String {
12 let mut c = s.chars();
13 match c.next() {
14 None => String::new(),
15 Some(f) => f.to_ascii_uppercase().to_string() + c.as_str(),
16 }
17}
18
19fn main() {
20 let names: Vec<String> = vec![

Callers

nothing calls this directly

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected