Java 8 Normalizer.Form - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 Normalizer.Form class.

This code example shows how to use the following methods:ordinal
 
package libcore.icu; 
 
import java.text.Normalizer.Form; 
 
public final class NativeNormalizer { 
    public static boolean isNormalized(CharSequence src, Form form) {
        return isNormalizedImpl(src.toString(), toUNormalizationMode(form));
    } 
 
    public static String normalize(CharSequence src, Form form) {
        return normalizeImpl(src.toString(), toUNormalizationMode(form));
    } 
 
    private static int toUNormalizationMode(Form form) {
        // Translates Java enum constants to ICU int constants. 
        // See UNormalizationMode in "unicode/unorm.h". Stable API since ICU 2.0. 
        switch (form) {
        case NFC: return 4;
        case NFD: return 2;
4
CodeRank
This code example shows how to use the following methods:ordinal
 
package libcore.icu; 
 
import java.text.Normalizer.Form; 
 
public final class NativeNormalizer { 
    public static boolean isNormalized(CharSequence src, Form form) {
        return isNormalizedImpl(src.toString(), toUNormalizationMode(form));
    } 
 
    public static String normalize(CharSequence src, Form form) {
        return normalizeImpl(src.toString(), toUNormalizationMode(form));
    } 
 
    private static int toUNormalizationMode(Form form) {
        // Translates Java enum constants to ICU int constants. 
        // See UNormalizationMode in "unicode/unorm.h". Stable API since ICU 2.0. 
        switch (form) {
        case NFC: return 4;
        case NFD: return 2;
5
CodeRank
This code example shows how to use the following methods:ordinal
    } 
 
    private static int toUNormalizationMode(Form form) {
        // Translates Java enum constants to ICU int constants. 
        // See UNormalizationMode in "unicode/unorm.h". Stable API since ICU 2.0. 
        switch (form) {
        case NFC: return 4;
        case NFD: return 2;
        case NFKC: return 5;
        case NFKD: return 3;
        } 
        throw new AssertionError("unknown Normalizer.Form " + form);
    } 
 
    private static native String normalizeImpl(String src, int form);
 
    private static native boolean isNormalizedImpl(String src, int form);
 
    private NativeNormalizer() {} 
} 
4
CodeRank
This code example shows how to use the following methods:ordinal
    } 
 
    private static int toUNormalizationMode(Form form) {
        // Translates Java enum constants to ICU int constants. 
        // See UNormalizationMode in "unicode/unorm.h". Stable API since ICU 2.0. 
        switch (form) {
        case NFC: return 4;
        case NFD: return 2;
        case NFKC: return 5;
        case NFKD: return 3;
        } 
        throw new AssertionError("unknown Normalizer.Form " + form);
    } 
 
    private static native String normalizeImpl(String src, int form);
 
    private static native boolean isNormalizedImpl(String src, int form);
 
    private NativeNormalizer() {} 
} 
4
CodeRank
This code example shows how to use the following methods:ordinal
 
package com.ibm.icu4jni.text; 
 
import java.text.Normalizer.Form; 
 
public final class NativeNormalizer { 
    public static boolean isNormalized(CharSequence src, Form form) {
        return isNormalizedImpl(src.toString(), toUNormalizationMode(form));
    } 
 
    public static String normalize(CharSequence src, Form form) {
        return normalizeImpl(src.toString(), toUNormalizationMode(form));
    } 
 
    private static int toUNormalizationMode(Form form) {
        // Translates Java enum constants to ICU int constants. 
        // See UNormalizationMode in "unicode/unorm.h". Stable API since ICU 2.0. 
        switch (form) {
        case NFC: return 4;
        case NFD: return 2;
4
CodeRank
This code example shows how to use the following methods:ordinal
 
package libcore.icu; 
 
import java.text.Normalizer.Form; 
 
public final class NativeNormalizer { 
    public static boolean isNormalized(CharSequence src, Form form) {
        return isNormalizedImpl(src.toString(), toUNormalizationMode(form));
    } 
 
    public static String normalize(CharSequence src, Form form) {
        return normalizeImpl(src.toString(), toUNormalizationMode(form));
    } 
 
    private static int toUNormalizationMode(Form form) {
        // Translates Java enum constants to ICU int constants. 
        // See UNormalizationMode in "unicode/unorm.h". Stable API since ICU 2.0. 
        switch (form) {
        case NFC: return 4;
        case NFD: return 2;
4
CodeRank
This code example shows how to use the following methods:ordinal
    } 
 
    private static int toUNormalizationMode(Form form) {
        // Translates Java enum constants to ICU int constants. 
        // See UNormalizationMode in "unicode/unorm.h". Stable API since ICU 2.0. 
        switch (form) {
        case NFC: return 4;
        case NFD: return 2;
        case NFKC: return 5;
        case NFKD: return 3;
        } 
        throw new AssertionError("unknown Normalizer.Form " + form);
    } 
 
    private static native String normalizeImpl(String src, int form);
 
    private static native boolean isNormalizedImpl(String src, int form);
 
    private NativeNormalizer() {} 
} 
4
CodeRank
This code example shows how to use the following methods:ordinal
 
package libcore.icu; 
 
import java.text.Normalizer.Form; 
 
public final class NativeNormalizer { 
    public static boolean isNormalized(CharSequence src, Form form) {
        return isNormalizedImpl(src.toString(), toUNormalizationMode(form));
    } 
 
    public static String normalize(CharSequence src, Form form) {
        return normalizeImpl(src.toString(), toUNormalizationMode(form));
    } 
 
    private static int toUNormalizationMode(Form form) {
        // Translates Java enum constants to ICU int constants. 
        // See UNormalizationMode in "unicode/unorm.h". Stable API since ICU 2.0. 
        switch (form) {
        case NFC: return 4;
        case NFD: return 2;
4
CodeRank
See Code Examples for Java 8 Normalizer.Form Methods: