Android Char Value Check getCharType(char c)

Here you can find the source of getCharType(char c)

Description

get Char Type

Declaration

public static int getCharType(char c) 

Method Source Code

//package com.java2s;

public class Main {
    static final int ArabicChar = 1;
    static final int LatinChar = 2;
    static final int NumberChar = 2;

    public static int getCharType(char c) {
        if (isArabic(c))
            return ArabicChar;
        else if (isNumber(c))
            return NumberChar;
        else/*from www .  j  a v a  2  s  .  com*/
            return LatinChar;
    }

    public static boolean isArabic(char c) {
        return (0x0621 <= c && c <= 0x06ED);
    }

    public static boolean isNumber(char c) {
        return (0x30 <= c && c <= 0x39);
    }
}

Related

  1. isWordSeparator(char c, char[] wordSeparators)
  2. getSpecialCharLength(char c)
  3. getCharsLength(char[] chars, int specialCharsLength)
  4. getNthIndexOf(char c, String str, int n)
  5. displayWidth(char ch)
  6. isAlef(char c)
  7. isArabic(char c)
  8. isHah(char c)
  9. isLatin(char c)