endOfColumns

fun endOfColumns(source: CharSequence, start: Int, end: Int, columns: Int): Int

Skips leading whitespace for as long as it spans fewer than columns columns, counting a tab up to the next TAB_WIDTH stop. A tab is never split: it is taken whole or not at all, which is why the limit is reached exactly when it is a multiple of TAB_WIDTH.

Return

index just past the skipped whitespace

Parameters

source

text to inspect

start

index of the slice's first character

end

index just past the slice's last character

columns

how many columns of whitespace to skip at most