Skip to main content

narrowing_prefix

Function narrowing_prefix 

Source
pub fn narrowing_prefix(filter: &str, names: &[&str]) -> Option<String>
Expand description

The server-side prefix a home filter can ask a cut-short level for, or None when it cannot ask for one.

A name filter is fuzzy and the server’s prefix is literal, so this asks for the names the filter most plausibly starts: the part names share up to their last separator (STATION=, year=), then the filter, in the case the names are written in. A filter already spelling that shared part is taken as typed.