(path: &Path, suffix: &Path)
| 1260 | } |
| 1261 | |
| 1262 | fn path_ends_with_ignore_ascii_case(path: &Path, suffix: &Path) -> bool { |
| 1263 | let mut path_components = path.components().rev(); |
| 1264 | |
| 1265 | for suffix_component in suffix.components().rev() { |
| 1266 | let Some(path_component) = path_components.next() else { |
| 1267 | return false; |
| 1268 | }; |
| 1269 | |
| 1270 | if !path_component |
| 1271 | .as_os_str() |
| 1272 | .to_string_lossy() |
| 1273 | .eq_ignore_ascii_case(&suffix_component.as_os_str().to_string_lossy()) |
| 1274 | { |
| 1275 | return false; |
| 1276 | } |
| 1277 | } |
| 1278 | |
| 1279 | true |
| 1280 | } |
| 1281 | |
| 1282 | fn starts_with_ignore_ascii_case(input: &str, prefix: &str) -> bool { |
| 1283 | input |
no test coverage detected
searching dependent graphs…