mirror of https://github.com/01-edu/public.git
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.
45 lines
698 B
45 lines
698 B
4 years ago
|
## pangram
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
Determine if the string is a pangram.
|
||
|
|
||
|
A pangram is a sentence using every letter of the alphabet at least once.
|
||
|
|
||
|
Example:
|
||
|
|
||
|
"The quick brown fox jumps over the lazy dog."
|
||
|
|
||
|
### Notions
|
||
|
|
||
|
- https://doc.rust-lang.org/book/ch18-00-patterns.html
|
||
|
|
||
|
### Expected functions
|
||
|
|
||
|
```rust
|
||
|
fn is_pangram(s: &str) -> bool {}
|
||
|
```
|
||
|
|
||
|
### Usage
|
||
|
|
||
|
Here is a program to test your function.
|
||
|
|
||
|
```rust
|
||
|
fn main() {
|
||
|
println!(
|
||
|
"{}",
|
||
|
is_pangram("the quick brown fox jumps over the lazy dog!")
|
||
|
);
|
||
|
println!("{}", is_pangram("this is not a pangram!"));
|
||
|
}
|
||
|
```
|
||
|
|
||
|
And its output
|
||
|
|
||
|
```console
|
||
|
student@ubuntu:~/[[ROOT]]/test$ cargo run
|
||
|
true
|
||
|
false
|
||
|
student@ubuntu:~/[[ROOT]]/test$
|
||
|
```
|