public char LineLastChar(Base.SciLexerBase scilexer, int line) { string linetext = ""; scilexer.GetLine(line, out linetext); for (int i = linetext.Length - 1; i >= 0; i--) { if (linetext[i] == '\t' || linetext[i] == ' ' || linetext[i] == '\r' || linetext[i] == '\n') { } else { return linetext[i]; } } return ' '; }