pub fn extension_priority(name: &str, extensions: &[&str]) -> usizeExpand description
Returns the extension priority for a filename (lower = higher priority).
Extensions are matched in order against the provided list. The index of the
first matching extension is returned. If no extension matches, returns usize::MAX.
ยงExample
use standout_render::file_loader::extension_priority;
let extensions = &[".yaml", ".yml"];
assert_eq!(extension_priority("config.yaml", extensions), 0);
assert_eq!(extension_priority("config.yml", extensions), 1);
assert_eq!(extension_priority("config.txt", extensions), usize::MAX);