Skip to content
Mahmoud Ben Hassine edited this page Nov 8, 2015 · 3 revisions

wc

Synopsis

Count words or lines in a stream.

Parameters

Name Type Mandatory Default
type WordCount.Option No WordCount.Option.W

Example

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

UnixStream.unixify(stream)
   .wc()
   .to(stdOut()); // prints 3

// Or

UnixStream.from(stream)
   .pipe(wc(L))
   .to(stdOut()); // prints 2
Clone this wiki locally