Open carloscn opened 1 year ago
pub fn cells_in_range(s: &str) -> Vec<String>
{
let mut ret:Vec<String> = vec![];
if s.is_empty() {
return ret;
}
let in_str:Vec<char> = s.chars().collect();
let (z, x, z_d, x_d) =
(in_str[0], in_str[3], in_str[1], in_str[4]);
let mut j:u8;
let mut i:u8 = z as u8;
let mut t:Vec<char> = vec![];
while i <= x as u8 {
t.push(i as char);
j = z_d as u8;
while j <= (x_d as u8) {
t.push(j as char);
ret.push(t.iter().collect());
t.pop();
j += 1;
}
t.pop();
i += 1;
}
return ret;
}
Description
A cell (r, c) of an excel sheet is represented as a string "