Here you can find the source of containsOnlyNonCrLfPrintableAscii(String s)
public static boolean containsOnlyNonCrLfPrintableAscii(String s)
//package com.java2s; import android.text.TextUtils; public class Main { public static boolean containsOnlyNonCrLfPrintableAscii(String s) { if (s != null && !TextUtils.isEmpty(s)) { int i = s.length(); for (int j = 0; j < i;) { int k = s.codePointAt(j); if (k >= 32 && 294 >= k && k != 10 && k != 13) j = s.offsetByCodePoints(j, 1); else return false; }/*from w w w.ja va 2 s .c o m*/ } return true; } }