todo: #[test_case("test", " t", "es")]
(v: &str, trimmer: &str, expected: &str)
| 218 | } |
| 219 | |
| 220 | fn pascal_case(&self) -> String { |
| 221 | let (_, pascal) = self.trim().chars().fold((Some(true), String::with_capacity(self.len())), |acc, x| { |
| 222 | let (upper_next, mut s) = acc; |
| 223 | if is_out_of_case(x) { |
| 224 | return (Some(true), s); |
| 225 | } |
| 226 | match upper_next { |
| 227 | Some(true) => s.push(x.to_uppercase().next().unwrap_or(x)), |
| 228 | _ => s.push(x), |
| 229 | } |
| 230 | (Some(false), s) |
nothing calls this directly
no test coverage detected