Skip to content
Mahmoud Ben Hassine edited this page Oct 9, 2015 · 4 revisions

trim

Synopsis

Trims a String by removing trailing white spaces.

Parameters

N/A

Example

Stream<String> stream = Stream.of(" a ", "  b c  ");

XStream.unixify(stream)
   .trim()
   .to(stdOut()); // prints "a", "b c"

// Or

XStream.from(stream)
   .pipe(dos2unix())
   .to(stdOut()); // prints "a", "b c"
Clone this wiki locally