Simplify finding indices of all instances of certain characters in a string
Simplify is a relative term. If you want simple, then I would have:

public static int[] findWrappingIndices(final String s) {
    int pos = 0;
    int[] ret = new int[s.length()];
    for (int i = 0; i &lt; s.length(); i++) {
        if (WRAPPING_CHARS.indexOf(s.charAt(i)) &gt;= 0) {
            ret[pos++] = i;
        }
    }
    return Arrays.copyOf(ret, pos);
}


But, you want to complexify it by using a SortedSet (because int[] is not easy to use?), so you can then convert the int[] to the SortedSet.

I don't see why the SortedSet is a good idea, but, it is easy enough to convert to using it (even though it is bigger and slower than an int[] array).

I don't think you will find a simpler (or faster) alternative.

I would guess that you could quavify it with (note the data is being inserted in sorted order anyway):

public static SortedSet&lt;Integer&gt; findWrappingIndices(final String s) {
    SortedSet&lt;Integer&gt; indices = Sets.newTreeSet();
    for (int i = 0; i &lt; s.length(); i++) {
        if (WRAPPING_CHARS.indexOf(s.charAt(i)) &gt;= 0) {
            indices.add(i);
        }
    }
    return indices;
}