Skip to main content

same_log_name

Function same_log_name 

Source
pub fn same_log_name(a: &str, b: &str) -> bool
Expand description

Whether the logs a and b may be one file on a disk that ignores case: their names differ only in letter case, as Unicode’s lower- or uppercase mapping sees it, so the final and medial sigma (ς, σ) match too. A file system’s own folding can still differ.

use rig_memory::same_log_name;

assert!(same_log_name("Helper", "helper"));
assert!(same_log_name("ς", "σ"));
assert!(!same_log_name("helper", "helpers"));