using System;
using FooEditEngine;
using System.Linq;

namespace FooEditor
{
    class Util
    {
        static public int GetTabCount(FooTextBox TextBox,int index)
        {
            int lineNumber = TextBox.LayoutLines.GetLineNumberFromIndex(index);
            string lineString = TextBox.LayoutLines[lineNumber];
            int tabNum = lineString.Count((c) => { return c == '\t'; });
            return tabNum;
        }
    }
}
