예제 #1
0
        /// <summary>
        /// Check if the given variant subtags separated by the given
        /// separator(s) are valid.
        /// </summary>
        private int CheckVariants(string variants, string sep)
        {
            StringTokenEnumerator itr = new StringTokenEnumerator(variants, sep);

            while (itr.MoveNext())
            {
                string s = itr.Current;
                if (!LanguageTag.IsVariant(s))
                {
                    return(itr.CurrentStart);
                }
            }
            return(-1);
        }