detab one line (replace tabs with spaces)
char c;
int col;
StringBuffer sb = new StringBuffer();
col = 0;
for (int i = 0; i < line.length(); i++) {
// Either ordinary character or tab.
if ((c = line.charAt(i)) != '\t") {
sb.append(c); // Ordinary
++col;
continue;
}
do { // Tab, expand it, must put >=1 space
sb.append(' ");
} while (!ts.isTabStop(++col));
}
return sb.toString();