Android Chinese String Check checkStringIsChinese(String str)

Here you can find the source of checkStringIsChinese(String str)

Description

check String Is Chinese

Declaration

public static boolean checkStringIsChinese(String str) 

Method Source Code

//package com.java2s;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

    public static boolean checkStringIsChinese(String str) {
        if (null == str) {
            return false;
        }/*  w w w  .  j av  a 2 s.  c o m*/
        Pattern pattern = Pattern.compile("[\\u4E00-\\u9FA5]+");
        Matcher matcher = pattern.matcher(str);
        return matcher.matches();
    }
}

Related

  1. isChinese(String str)
  2. isChinese(String strName)
  3. isChinese(char c)
  4. isChinese(String str)
  5. isContainChinese(String str)
  6. hasChinese(String key)