int (@NotNull String indent, int tabSize) { int width = 0; for (int i = 0; i < indent.length(); i++) { char c = indent.charAt(i); switch (c) { case '\t': width = tabSize * (width / tabSize + 1); break; default: LOG.error("Unexpected whitespace character: " + ((int)c)); case ' ': width++; } } return width; }