7 lines
157 B
Rust
7 lines
157 B
Rust
pub fn split_lines(s: &str) -> Vec<&str> {
|
|
s.trim_end().split('\n').collect()
|
|
}
|
|
|
|
pub fn split_words(s: &str) -> Vec<&str> {
|
|
s.split(' ').collect()
|
|
}
|