Function accept_language::intersection
source · pub fn intersection(
raw_languages: &str,
supported_languages: &[&str]
) -> Vec<String>
Expand description
Compare an Accept-Language header value with your application’s supported languages to find the common languages that could be presented to a user.
Example
use accept_language::intersection;
let common_languages = intersection("en-US, en-GB;q=0.5", &["en-US", "de", "en-GB"]);