Example usage for java.lang CharSequence codePoints

List of usage examples for java.lang CharSequence codePoints

Introduction

In this page you can find the example usage for java.lang CharSequence codePoints.

Prototype

public default IntStream codePoints() 

Source Link

Document

Returns a stream of code point values from this sequence.

Usage

From source file:pt.ua.ri.tokenizer.WordTokenizer.java

@Override
public CharSequence cleanWord(final CharSequence word) {
    checkNotNull(word);//from   w  w w . j a  va 2s . c om
    return word.codePoints().filter(Character::isLetter).map(Character::toLowerCase).collect(StringBuilder::new,
            StringBuilder::appendCodePoint, StringBuilder::append);
}