예제 #1
0
 protected override void ConvertIntergralStackToText(StackWithIndex stack, StringBuilder text)
 {
     string zero = string.Empty;
     bool flag = true;
     while (stack.Count > 0)
     {
         string str2 = stack.Pop();
         if (str2 == this.Zero)
         {
             if (!flag)
             {
                 zero = this.Zero;
             }
             flag = true;
         }
         else
         {
             if (((str2 == this.TenThousand) || (str2 == this.HundredMillion)) || (str2 == this.ThousandBillion))
             {
                 text.Append(str2);
                 zero = string.Empty;
                 flag = false;
                 continue;
             }
             if (!string.IsNullOrEmpty(str2))
             {
                 text.Append(zero);
                 text.Append(str2);
                 zero = string.Empty;
                 flag = false;
             }
         }
     }
 }
예제 #2
0
        protected override void ConvertIntergralStackToText(StackWithIndex stack, StringBuilder text)
        {
            string zero = string.Empty;
            bool   flag = true;

            while (stack.Count > 0)
            {
                string str2 = stack.Pop();
                if (str2 == this.Zero)
                {
                    if (!flag)
                    {
                        zero = this.Zero;
                    }
                    flag = true;
                }
                else
                {
                    if (((str2 == this.TenThousand) || (str2 == this.HundredMillion)) || (str2 == this.ThousandBillion))
                    {
                        text.Append(str2);
                        zero = string.Empty;
                        flag = false;
                        continue;
                    }
                    if (!string.IsNullOrEmpty(str2))
                    {
                        text.Append(zero);
                        text.Append(str2);
                        zero = string.Empty;
                        flag = false;
                    }
                }
            }
        }
예제 #3
0
 protected override void ConvertIntergralStackToText(StackWithIndex stack, StringBuilder text)
 {
     while (stack.Count > 0)
     {
         string str = stack.Pop();
         text.Append(str);
     }
 }
예제 #4
0
 protected override void ConvertIntergralStackToText(StackWithIndex stack, StringBuilder text)
 {
     while (stack.Count > 0)
     {
         string str = stack.Pop();
         text.Append(str);
     }
 }
예제 #5
0
        protected override void ConvertIntergralStackToText(StackWithIndex stack, StringBuilder text)
        {
            while (stack.Count > 0)
            {
                if (!string.IsNullOrEmpty(stack.Peek()))
                {
                    break;
                }
                stack.Pop();
            }
            bool flag = false;

            if (stack.Peek().Equals(this.Digits[1]))
            {
                for (int i = 2; i < stack.Count; i++)
                {
                    if (!string.IsNullOrEmpty(stack[i]))
                    {
                        break;
                    }
                    if (i == (stack.Count - 1))
                    {
                        flag = true;
                    }
                }
            }
            else
            {
                flag = false;
            }
            while (stack.Count > 0)
            {
                string str = stack.Pop();
                if (!string.IsNullOrEmpty(str))
                {
                    if (flag)
                    {
                        flag = false;
                    }
                    else
                    {
                        if (!str.StartsWith(this.Digits[1]) || ((!str.EndsWith(this.Ten) && !str.EndsWith(this.Hundred)) && !str.EndsWith(this.Thousand)))
                        {
                            text.Append(str);
                            continue;
                        }
                        text.Append(str.Substring(this.Digits[1].Length));
                    }
                }
            }
            if (text[text.Length - 1] == ' ')
            {
                text.Remove(text.Length - 1, 1);
            }
        }
예제 #6
0
 protected override void ConvertIntergralStackToText(StackWithIndex stack, StringBuilder text)
 {
     while (stack.Count > 0)
     {
         if (!string.IsNullOrEmpty(stack.Peek()))
         {
             break;
         }
         stack.Pop();
     }
     bool flag = false;
     if (stack.Peek().Equals(this.Digits[1]))
     {
         for (int i = 2; i < stack.Count; i++)
         {
             if (!string.IsNullOrEmpty(stack[i]))
             {
                 break;
             }
             if (i == (stack.Count - 1))
             {
                 flag = true;
             }
         }
     }
     else
     {
         flag = false;
     }
     while (stack.Count > 0)
     {
         string str = stack.Pop();
         if (!string.IsNullOrEmpty(str))
         {
             if (flag)
             {
                 flag = false;
             }
             else
             {
                 if (!str.StartsWith(this.Digits[1]) || ((!str.EndsWith(this.Ten) && !str.EndsWith(this.Hundred)) && !str.EndsWith(this.Thousand)))
                 {
                     text.Append(str);
                     continue;
                 }
                 text.Append(str.Substring(this.Digits[1].Length));
             }
         }
     }
     if (text[text.Length - 1] == ' ')
     {
         text.Remove(text.Length - 1, 1);
     }
 }
예제 #7
0
 protected override void ConvertIntergralStackToText(StackWithIndex stack, StringBuilder text)
 {
     while (stack.Count > 0)
     {
         string str = stack.Pop();
         text.Append(str);
     }
     if (text[text.Length - 1] == ' ')
     {
         text.Remove(text.Length - 1, 1);
     }
 }
예제 #8
0
 protected override void ConvertIntergralStackToText(StackWithIndex stack, StringBuilder text)
 {
     while (stack.Count > 0)
     {
         string str = stack.Pop();
         text.Append(str);
     }
     if (text[text.Length - 1] == ' ')
     {
         text.Remove(text.Length - 1, 1);
     }
 }
예제 #9
0
 protected override void ConvertIntergralStackToText(StackWithIndex stack, StringBuilder text)
 {
     while (stack.Count > 0)
     {
         if (!(stack.Peek() == this.Zero))
         {
             break;
         }
         stack.Pop();
     }
     while (stack.Count > 0)
     {
         text.Append(stack.Pop());
     }
 }
예제 #10
0
 protected override void ConvertIntergralStackToText(StackWithIndex stack, StringBuilder text)
 {
     while (stack.Count > 0)
     {
         if (!(stack.Peek() == this.Zero))
         {
             break;
         }
         stack.Pop();
     }
     while (stack.Count > 0)
     {
         text.Append(stack.Pop());
     }
 }