getLineContentStart method

int getLineContentStart(
  1. int index
)

Skips spaces and tabs on the left from index.

If index is the start or a statement, then in most cases this returns the offset of the line in which index is found.

Implementation

int getLineContentStart(int index) {
  while (index > 0) {
    var c = _buffer.codeUnitAt(index - 1);
    if (!c.isSpace) {
      break;
    }
    index--;
  }
  return index;
}