Android String Contain containChinese(String s)

Here you can find the source of containChinese(String s)

Description

contain Chinese

Declaration

public static boolean containChinese(String s) 

Method Source Code

//package com.java2s;

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

public class Main {

    public static boolean containChinese(String s) {
        if (null == s) {
            return false;
        }//  www. j ava2s. com

        Pattern pattern = Pattern.compile(".*[\u4e00-\u9fbb]+.*");
        Matcher matcher = pattern.matcher(s);
        return matcher.matches();
    }
}

Related

  1. cutWords(String src, String contains)
  2. cutWordsAll(String src, String contains)
  3. containsCharRef(String s)
  4. containsIgnoreCase(String str, String query)
  5. contains(String[] components, String value)
  6. contains(final String str, final char ch)
  7. contains(final String s1, final String s2)
  8. contains(String target, String content)