Ejemplo n.º 1
0
        internal static string GetLanguageValue(ref string value)
        {
            switch (value.StartsWith("\""))
            {
            case true:
                Parsing.MustMatch(ref value, "^\"");
                // Parsing.MustMatch(ref value, @"\""([^\""]+)\""").Groups[1].Value;
                return(Parsing.MatchUntilSingle(ref value, '"'));

            default:
                return(Parsing.MustMatch(ref value, @"([^;]+)").Groups[1].Value);
            }
        }
        internal static string GetLanguageValue(ref string value)
        {
            if (value.StartsWith(";", StringComparison.InvariantCulture) || String.IsNullOrEmpty(value))
            {
                return(string.Empty);
            }

            switch (value.StartsWith("\"", StringComparison.InvariantCulture))
            {
            case true:
                Parsing.MustMatch(ref value, "^\"");
                // Parsing.MustMatch(ref value, @"\""([^\""]+)\""").Groups[1].Value;
                return(Parsing.MatchUntilSingle(ref value, '"'));

            default:
                return(Parsing.MustMatch(ref value, @"([^;]+)").Groups[1].Value);
            }
        }