BaconBuilder.Model.Parser.Parse C# (CSharp) 메소드

Parse() 공개 메소드

Replaces each matching regex key in the dictionary with its associated value for a given string.
public Parse ( string input ) : string
input string String to perform substitutions on.
리턴 string
        public virtual string Parse(string input)
        {
            string output = input;

            foreach (KeyValuePair<string, string> kvp in RegexDict)
                foreach (Match m in Regex.Matches(input, kvp.Key))
                    output = Regex.Replace(output, kvp.Key, kvp.Value);

            return output;
        }