is Chinese Telephone Num Available - Android Internationalization

Android examples for Internationalization:Chinese

Description

is Chinese Telephone Num Available

Demo Code

import android.util.Log;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main{

    public static boolean isTelNumAvailable(String telNum) {
        boolean result = false;
        if (!isNullOrEmpty(telNum)
                && telNum.matches("^1[3458]{1}[0-9]{9}$")) {
            result = true;//w  w w.  j av  a 2  s . c o  m
        }
        return result;
    }

}

Related Tutorials