Given a String s and a char c, I\'m curious if there exists some method of producing a List list from s (where
String s
char c
List list
s
Can be done with IntStream
public static List getIndexList(String s, char c) { return IntStream.range(0, s.length()) .filter(index -> s.charAt(index) == c) .boxed() .collect(Collectors.toList()); }