- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for MatchStrings (0.16 sec)
-
src/cmd/vendor/golang.org/x/text/language/doc.go
// The MatchString finds best matches for such strings: // // handler(w http.ResponseWriter, r *http.Request) { // lang, _ := r.Cookie("lang") // accept := r.Header.Get("Accept-Language") // tag, _ := language.MatchStrings(matcher, lang.String(), accept) // // // tag should now be used for the initialization of any // // locale-specific service. // } // // The Matcher's Match method can be used to match Tags directly. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 13:01:26 UTC 2024 - 4.2K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/text/language/match.go
// Making it a concrete type allows MatchStrings to be a method, which will // improve its discoverability. // MatchStrings parses and matches the given strings until one of them matches // the language in the Matcher. A string may be an Accept-Language header as // handled by ParseAcceptLanguage. The default language is returned if no // other language matched. func MatchStrings(m Matcher, lang ...string) (tag Tag, index int) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 13:01:26 UTC 2024 - 25.1K bytes - Viewed (0)