Example #1
0
        public void FastStringBuilder_ShouldParseInt()
        {
            var builder = new FastStringBuilder();

            builder.Append("1233321");

            Assert.AreEqual(1233321, builder.ParseInt());

            builder.Clear();

            builder.Append("+1235321");

            Assert.AreEqual(1235321, builder.ParseInt());

            builder.Clear();

            builder.Append("-1234321");

            Assert.AreEqual(-1234321, builder.ParseInt());
        }
Example #2
0
 public int ToInt()
 {
     return(StringBuilder.ParseInt());
 }