static L splitAtSlash_keepAll(S s) { int i = 0; new L l; while true { int j = smartIndexOf(s, '/', i); l.add(substring(s, i, j)); if (j == l(s)) break; i = j+1; } ret l; }