Skip to content
Mahmoud Ben Hassine edited this page Nov 21, 2015 · 4 revisions

expand

Synopsis

Replaces tabs with spaces in a stream of Strings.

Parameters

N/A

Example

Stream<String> stream = Stream.of("a\tb", "b\t\tc");

UnixStream.unixify(stream)
   .expand()
   .to(stdOut()); // prints "a b", "b  c"

// Or

UnixStream.from(stream)
   .pipe(expand())
   .to(stdOut()); // prints "a b", "b  c"

// Or

stream
    .map(Functions.expand())
    .forEach(System.out::println); // prints "a b", "b  c"
Clone this wiki locally