Here you can find the source of isStringWithLen(String str, int len)
public static final boolean isStringWithLen(String str, int len)
//package com.java2s; public class Main { public static final boolean isStringWithLen(String str, int len) { if (str == null) { return false; }/* w ww .j a va2 s . co m*/ if (str.trim().length() < len) { return false; } return true; } public static final boolean isStringWithLen(Object obj, int len) { if (obj == null) { return false; } if (obj.toString().trim().length() < len) { return false; } return true; } }