src/third_party/mozjs/extract/js/src/builtin/intl/CommonFunctions.js
/**
 * Removes Unicode locale extension sequences from the given language tag.
 */
Removes Unicode locale extension sequences from the given language tag.
Removes Unicode locale extension sequences from the given language tag .
function removeUnicodeExtensions(locale) {
    assertIsValidAndCanonicalLanguageTag(locale, "locale with possible Unicode extension");
    var start = startOfUnicodeExtensions(locale);
    if (start < 0)
        return locale;
    var end = endOfUnicodeExtensions(locale, start);
    var left = Substring(locale, 0, start);
    var right = Substring(locale, end, locale.length - end);
    var combined = left + right;
    assertIsValidAndCanonicalLanguageTag(combined, "the recombined locale");
    assert(startOfUnicodeExtensions(combined) < 0,
           "recombination failed to remove all Unicode locale extension sequences");
    return combined;
}
function removeUnicodeExtensions ( locale ) { assertIsValidAndCanonicalLanguageTag ( locale , "locale with possible Unicode extension" ) ; var start = startOfUnicodeExtensions ( locale ) ; if ( start < 0 ) return locale ; var end = endOfUnicodeExtensions ( locale , start ) ; var left = Substring ( locale , 0 , start ) ; var right = Substring ( locale , end , locale . length - end ) ; var combined = left + right ; assertIsValidAndCanonicalLanguageTag ( combined , "the recombined locale" ) ; assert ( startOfUnicodeExtensions ( combined ) < 0 , "recombination failed to remove all Unicode locale extension sequences" ) ; return combined ; }
Removes Unicode locale extension sequences from the given language tag.
Removes Unicode locale extension sequences from the given language tag .