static S nlToBr_withIndents(S s) { s = nlToBr(s); new StringBuilder buf; int i = 0; while (i < l(s)) { while (charAt(s, i) == ' ') { ++i; buf.append(" "); } int j = smartIndexOf(s, i, '\n')+1; buf.append(substring(s, i, j)); i = j; } ret str(buf); }