GetCharAt() public method

public GetCharAt ( int offset ) : char
offset int
return char
 private void CloseBracket(TextEditor.TextEditor editor, TextDocument document, string text)
 {
     if (text[0].IsCloseBracketChar() && editor.CaretIndex < document.TextLength && editor.CaretIndex > 0)
     {
         if (document.GetCharAt(editor.CaretIndex) == text[0])
         {
             document.Replace(editor.CaretIndex - 1, 1, string.Empty);
         }
     }
 }
        private void OpenBracket(TextEditor.TextEditor editor, TextDocument document, string text)
        {
            if (text[0].IsOpenBracketChar() && editor.CaretIndex <= document.TextLength && editor.CaretIndex > 0)
            {
                var nextChar = ' ';

                if (editor.CaretIndex != document.TextLength)
                {
                    document.GetCharAt(editor.CaretIndex);
                }

                if (char.IsWhiteSpace(nextChar) || nextChar.IsCloseBracketChar())
                {
                    document.Insert(editor.CaretIndex, text[0].GetCloseBracketChar().ToString());
                }
            }
        }