예제 #1
0
 public static TextValue Repeat(NumberValue n, string t)
 {
     StringBuilder sb = new StringBuilder();
     for (int i = (int)n.value; 0 < i; --i)
         sb.Append(t);
     return new TextValue(sb.ToString());
 }
예제 #2
0
        public static TextValue Repeat(NumberValue n, string t)
        {
            StringBuilder sb = new StringBuilder();

            for (int i = (int)n.value; 0 < i; --i)
            {
                sb.Append(t);
            }
            return(new TextValue(sb.ToString()));
        }