You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1000 B

## capitalizing
### Instructions
4 years ago
Complete the `capitalize_first` **function** which turns the first letter of a string to uppercase.
4 years ago
Complete the `title_case` **function** which turns the first letter of each word in a string to uppercase.
4 years ago
Complete the `change_case` **function** which turns the uppercase letters of a string into lowercase and the lowercase letters into uppercase.
### Expected Functions
```rust
pub fn capitalize_first(input: &str) -> String {
}
pub fn title_case(input: &str) -> String {
}
pub fn change_case(input: &str) -> String {
}
```
### Usage
4 years ago
Here is a program to test your functions.
```rust
4 years ago
use capitalizing::*capitalizing*;
fn main() {
println!("{}", capitalize_first("joe is missing"));
println!("{}", title_case("jill is leaving A"));
println!("{}",change_case("heLLo THere"));
}
```
And its output
4 years ago
```consoole
student@ubuntu:~/capitalizing/test$ cargo run
Joe is missing
Jill Is Leaving A
HEllO thERE
student@ubuntu:~/capitalizing/test$
```