static L splitAfterChars_trim(S chars, S s) { new L out; L l = indexesOfCharacters(s, chars); addFirstUnlessThere(l, 0); addUnlessThere(l, l(s)); for (int i = 0; i+1 < l(l); i++) { S x = trim(substring(s, l.get(i), l.get(i+1))); if (nempty(x)) out.add(x); } ret out; }