MCPcopy Create free account
hub / github.com/apache/datafusion / path_ends_with_ignore_ascii_case

Function path_ends_with_ignore_ascii_case

benchmarks/src/sql_benchmark.rs:1262–1280  ·  view source on GitHub ↗
(path: &Path, suffix: &Path)

Source from the content-addressed store, hash-verified

1260}
1261
1262fn 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
1282fn starts_with_ignore_ascii_case(input: &str, prefix: &str) -> bool {
1283 input

Callers 1

parse_group_from_pathFunction · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…