public int findStartOffset(StringBuilder buffer, int start) {if( start > buffer.length() || start < 1 ) return start;bi.setText(buffer.substring(0, start));bi.last();return bi.previous();}
public virtual int FindStartOffset(StringBuilder buffer, int start){if (start > buffer.Length || start < 1) return start;bi.SetText(buffer.ToString(0, start - 0));bi.Last();return bi.Previous();}