-
Notifications
You must be signed in to change notification settings - Fork 15
trunc
Mahmoud Ben Hassine edited this page Nov 21, 2015
·
4 revisions
Truncates a String to a limited size.
Name | Type | Mandatory | Default |
---|---|---|---|
size | int | Yes | N/A |
Stream<String> stream = Stream.of("abc", "def");
UnixStream.unixify(stream)
.trunc(2)
.to(stdOut()); // prints "ab", "de"
// Or
UnixStream.from(stream)
.pipe(trunc(2))
.to(stdOut()); // prints "ab", "de"
// Or
stream
.map(Functions.trunc(2))
.forEach(System.out::println); // prints "ab", "de"
UnixStream is created with passion by Mahmoud Ben Hassine