aoc prelude
This commit is contained in:
parent
34629ee970
commit
c18cfa45a4
4 changed files with 10 additions and 3 deletions
7
2022/src/lib.rs
Normal file
7
2022/src/lib.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
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()
|
||||
}
|
||||
Loading…
Reference in a new issue