Example usage for org.apache.lucene.analysis CharacterUtils toUpperCase

List of usage examples for org.apache.lucene.analysis CharacterUtils toUpperCase

Introduction

In this page you can find the example usage for org.apache.lucene.analysis CharacterUtils toUpperCase.

Prototype

public static void toUpperCase(final char[] buffer, final int offset, final int limit) 

Source Link

Document

Converts each unicode codepoint to UpperCase via Character#toUpperCase(int) starting at the given offset.

Usage

From source file:io.crate.expression.scalar.string.StringCaseFunction.java

License:Apache License

public static void register(ScalarFunctionModule module) {
    module.register(new StringCase("upper", (ref, len) -> {
        CharacterUtils.toUpperCase(ref, 0, len);
        return ref;
    }));/* w  w w.ja v  a2s.  c  om*/
    module.register(new StringCase("lower", (ref, len) -> {
        CharacterUtils.toLowerCase(ref, 0, len);
        return ref;
    }));
}