This commit is contained in:
Mylloon 2022-08-30 22:45:58 +02:00
parent fb21d3eece
commit 344b018936
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -65,8 +65,20 @@ pub fn line_table(
}; };
// Courses columns // Courses columns
for i in 0..number_cell - 2 { let range = number_cell - 1;
let mut last_day = false;
for i in 0..range {
// Check if it's a big cell // Check if it's a big cell
if i == range - 1 {
// Friday only
match skip_with.get(&i) {
Some(text) => {
println!("{:^cell_length$}{}", text, rsbc_bbc);
last_day = true;
},
None => (),
}
} else {
match skip_with.get(&i) { match skip_with.get(&i) {
Some(text) => match skip_with.get(&(i + 1)) { Some(text) => match skip_with.get(&(i + 1)) {
// Match check if the next cell will be big // Match check if the next cell will be big
@ -80,8 +92,11 @@ pub fn line_table(
}, },
} }
} }
}
if !last_day {
println!("{}{}", line, rs); println!("{}{}", line, rs);
} }
}
// Split a string in half with respect of words // Split a string in half with respect of words
pub fn split_half(text: &str) -> (&str, &str) { pub fn split_half(text: &str) -> (&str, &str) {