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