<div dir="ltr">I was trying to solve a puzzle (see post in JavaRanch <a href="https://coderanch.com/t/784868/java/puzzling-partitioningBy-IntStream-compile-error">https://coderanch.com/t/784868/java/puzzling-partitioningBy-IntStream-compile-error</a>)<div>I found that String.chars() yields an IntStream.</div><div>Someone pointed out that to convert it into Characters, one has to do</div><div> </div><div>  Stream<Character> sc = s.chars().mapToObj(n -> (char) n);<br></div><div><br></div><div>It should not take so many obscure steps like this to turn a String into a stream of chars!<br>I feel the Java API needs another method<br><br></div><div>Stream<Character> String.asChars()<br></div><div><br></div><div>thanks,</div><div>Anil</div><div><br></div></div>