Function accept_language::intersection
source · 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", vec!["en-US", "de", "en-GB"]);