public static int Reduce(StringBuilder p)
        {
            List<int> tempOpen = new List<int>();
            int index;
            int numberSignais = 0;
            bool lostClosed = false;
            for (int i = 0; i < p.Length; i++)
            {
                if (!Char.IsNumber(p[i]))
                {
                    //First case the equation is inside!
                    if (p[i] == ')')
                    {
                        closed++;
                        if (tempOpen.Count > 0)
                        {
                            index = tempOpen[tempOpen.Count - 1];

                            StringBuilder pointer = new StringBuilder(p.ToString(index + 1, i - index - 1));

                            String result = SimpleSolve(pointer).ToString();

                            i = p.ReplaceRegion(index, i, result) - 1;

                            tempOpen.RemoveAt(tempOpen.Count - 1);
                        }
                        else
                        {
                            lostClosed = true;
                        }
                    }
                    else
                    {
                        if (p[i] == '(')
                        {
                            open++;
                            tempOpen.Add(i);

                        }
                        else
                        {
                            numberSignais++;
                        }
                    }
                }
            }
            if (tempOpen.Count == 0 && lostClosed == false)
            {
                if (p[0] != '*' && p[0] != '/' && Char.IsNumber(p[p.Length - 1]))
                {
                    int result = SimpleSolve(p);
                    p.Clear();
                    p.Append(result);
                }

            }

            return numberSignais;
        }
        public void String_Test_Value()
        {
            StringBuilder sb = new StringBuilder("abcdefghij");

            int index = sb.ReplaceRegion(2, 4, "teste");

            Assert.IsTrue(sb.ToString().Equals("abtestefghij"));
        }
        public void String_Test_Next_Char()
        {
            StringBuilder sb = new StringBuilder("abcdefghij");

            int index = sb.ReplaceRegion(2, 4, "teste");

            Assert.IsTrue(sb[index].Equals('f'));
        }