Android String Length Check isStringWithLen(String str, int len)

Here you can find the source of isStringWithLen(String str, int len)

Description

is String With Len

Declaration

public static final boolean isStringWithLen(String str, int len) 

Method Source Code

//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;
    }
}

Related

  1. checkMinLength(final String x, final int min)
  2. isStringWithLen(Object obj, int len)
  3. strlen(String str, String charset)
  4. strlen(String str, String charset)
  5. strLength(String str)