Project: Password Phrase
One way to come up with a password is to think of a long phrase that is easy to remember, then take the first letter of each word in the phrase to compose the password. Write a program that defines a string constant with the phrase, then prints out the password composed from the first letter of each word in the phrase.
Output
$ rustc PasswordPhrase.rs
error[E0432]: unresolved import `regex`
--> PasswordPhrase.rs:7:5
|
7 | use regex::Regex;
| ^^^^^ maybe a missing crate `regex`?
|
= help: consider adding `extern crate regex` to use the `regex` crate
error[E0425]: cannot find value `Utils` in this scope
--> PasswordPhrase.rs:15:7
|
15 | if !Utils.isEmpty(word) {
| ^^^^^ not found in this scope
error[E0425]: cannot find function `split` in this scope
--> PasswordPhrase.rs:13:30
|
13 | let mut words:Vec<String> = split(phrase,Regex::new(r" ").unwrap());
| ^^^^^ not found in this scope
error[E0425]: cannot find function `prefix` in this scope
--> PasswordPhrase.rs:16:17
|
16 | password = &(prefix(word,1));
| ^^^^^^ not found in this scope
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0425, E0432.
For more information about an error, try `rustc --explain E0425`.