Here you can find the source of hasHighChars(String s)
public static boolean hasHighChars(String s)
//package com.java2s; //License from project: Apache License public class Main { public static char LOWCHAR = ' '; public static char HIGHCHAR = 0xFFFF; public static boolean hasHighChars(String s) { int len = s.length(); for (int i = 0; i < len; i++) { char ch = s.charAt(i); if (ch < LOWCHAR || ch > HIGHCHAR) { if (ch != '\n' && ch != '\r') return true; }/* ww w . j a va 2 s . c om*/ } return false; } }