Пример #1
0
 public static List<string> ParseFuncionParams(string paramStr)
 {
     XTokenQueue tq = new XTokenQueue(paramStr);
     return tq.ParseFuncionParams();
 }
Пример #2
0
        /// <summary>
        /// Remove padding for JSONP
        /// </summary>
        /// <param name="text"></param>
        /// <param name="padding"></param>
        /// <returns></returns>
        public string RemovePadding(string text, string padding)
        {
            if (string.IsNullOrEmpty(padding))
            {
                return text;
            }

            XTokenQueue tokenQueue = new XTokenQueue(text);
            tokenQueue.ConsumeWhitespace();
            tokenQueue.Consume(padding);
            tokenQueue.ConsumeWhitespace();
            return tokenQueue.ChompBalancedNotInQuotes('(', ')');
        }