pub fn capitalize_first(input: &str) -> String {
    let mut c = input.chars();
    match c.next() {
        None => String::new(),
        Some(first) => first.to_uppercase().to_string() + c.as_str(),
    }
}
// iterators2.rs
// In this module, you'll learn some of unique advantages that iterators can offer.
// Step 1. Complete the `capitalize_first` function to pass the first two cases.
// Step 2. Apply the `capitalize_first` function to a vector of strings.
//         Ensure that it returns a vector of strings as well.
// Step 3. Apply the `capitalize_first` function again to a list.
//         Try to ensure it returns a single string.
// As always, there are hints if you execute `rustlings hint iterators2`!
iterators2.rs
In this module, you'll learn some of unique advantages that iterators can offer.
Step 1. Complete the `capitalize_first` function to pass the first two cases.
Step 2. Apply the `capitalize_first` function to a vector of strings.
Ensure that it returns a vector of strings as well.
Step 3. Apply the `capitalize_first` function again to a list.
Try to ensure it returns a single string.
As always, there are hints if you execute `rustlings hint iterators2`!
iterators2 . rs In this module you ' ll learn some of unique advantages that iterators can offer . Step 1 . Complete the ` capitalize_first ` function to pass the first two cases . Step 2 . Apply the ` capitalize_first ` function to a vector of strings . Ensure that it returns a vector of strings as well . Step 3 . Apply the ` capitalize_first ` function again to a list . Try to ensure it returns a single string . As always there are hints if you execute ` rustlings hint iterators2 ` !
pub fn capitalize_first(input: &str) -> String {
    let mut c = input.chars();
    match c.next() {
        None => String::new(),
        Some(first) => first.to_uppercase().to_string() + c.as_str(),
    }
}
pub fn capitalize_first ( input : & str ) -> String { let mut c = input . chars ( ) ; match c . next ( ) { None => String :: new ( ) , Some ( first ) => first . to_uppercase ( ) . to_string ( ) + c . as_str ( ) , } }
iterators2.rs
In this module, you'll learn some of unique advantages that iterators can offer.
iterators2 . rs In this module you ' ll learn some of unique advantages that iterators can offer .
input
&str
input
&str