示例#1
0
        /// <summary>
        /// Returns processed string with the specified Mold.
        /// </summary>
        public static string Mold(this string subject, Mold mold)
        {
            var response = new StringBuilder(subject);

            response.Mold(mold);
            return(response.ToString());
        }
示例#2
0
        /// <summary>
        /// Processes string in builder with a specified Mold.
        /// </summary>
        public static void Mold(this StringBuilder subject, Mold mold)
        {
            if (mold == null)
            {
                throw new ArgumentNullException(nameof(mold));
            }

            map[mold.Type](subject, mold.Attributes);
        }