-
Notifications
You must be signed in to change notification settings - Fork 15
compact
Mahmoud Ben Hassine edited this page Nov 21, 2015
·
4 revisions
Compacts a String by removing all white spaces and tabs.
N/A
Stream<String> stream = Stream.of("a b", "c\td");
UnixStream.unixify(stream)
.compact()
.to(stdOut()); // prints "ab", "cd"
// Or
UnixStream.from(stream)
.pipe(compact())
.to(stdOut()); // prints "ab", "cd"
// Or
stream
.map(Functions.compact())
.forEach(System.out::println); // prints "ab", "cd"
UnixStream is created with passion by Mahmoud Ben Hassine