Android Char Compare compare(char firstChar, char secondChar)

Here you can find the source of compare(char firstChar, char secondChar)

Description

compare

Declaration

public static boolean compare(char firstChar, char secondChar) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean compare(char firstChar, char secondChar) {
        return ((firstChar == secondChar)
                || (isAlef(firstChar) && isAlef(secondChar))
                || (isHah(firstChar) && isHah(secondChar)) || (isYeh(firstChar) && isYeh(secondChar)));
    }//from   w  w  w  . j a  v  a  2 s  .com

    public static boolean isAlef(char c) {
        return (c == 0x0622 || c == 0x0623 || c == 0x0625 || c == 0x0627);
    }

    public static boolean isHah(char c) {
        return (c == 0x0629 || c == 0x0647);
    }

    public static boolean isYeh(char c) {
        return (c == 0x0649 || c == 0x0649);
    }
}