static int indentWidth(int spacesPerTab default 2, S s) { int count = 0, n = l(s); for i to n: { char c = s.charAt(i); if (c == ' ') ++count; else if (c == '\t') count += spacesPerTab; else break; } ret count; }