List of utility methods to do String Length Get
int | length(String str) returns the length of the given string. return str == null ? 0 : str.length();
|
int | length(String str) Gets a String's length or 0 if the String is null .
return str == null ? 0 : str.length();
|
int | length(String string) Returns the length or number of characters of the string. int length = 0; if (string != null) length = string.length(); return length; |
int | length(String string) length return string == null ? 0 : string.length();
|
int | length(String... args) Cumulative length of strings in varargs if (args == null) return 0; int acc = 0; for (String arg : args) { acc += arg.length(); return acc; |
boolean | lengthBetween(String param, int minLength, int maxLength) length Between boolean flag = false; if (notNOE(param)) { if (param.length() >= minLength && param.length() <= maxLength) { flag = true; return flag; |
int | lengthByteInPrepared(String s) length Byte In Prepared int length = 0; if (s == null) { return length; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) <= 127) { length++; } else { ... |
boolean | lengthCheck(final String str, final int minLength, final int maxLength) Check the length of the string str using the minimum and maximum values provided. int len = str.length(); return len >= minLength && len <= maxLength; |
String | lengthConstToString(int val, int len) length Const To String StringBuffer sbuf = new StringBuffer(); int factor = 1; for (int i = 0; i < len; i++) factor *= 10; for (boolean done = false; !done;) { if (val / factor == 0) { sbuf.append('0'); factor /= 10; ... |
float | LengthConversionFactor(String OldUnits) Length Conversion Factor int n = getNumericStart(OldUnits); float factor = 1; if (n > 0) try { factor = (new Float(OldUnits.substring(0, n))).floatValue(); } catch (Exception ss) { factor = 1; OldUnits = OldUnits.substring(n); if ("m;meter;met;".indexOf(OldUnits + ";") >= 0) return factor * 1; if ("cm;centim;centimeter;cmeter;cmet;100mm;100millim;100millimeter;".indexOf(OldUnits + ";") >= 0) return factor * .01f; if ("mm;millim;millimeter;100um;100microm;".indexOf(OldUnits + ";") >= 0) return factor * .001f; if ("um;umet;umeter;umeters;".indexOf(OldUnits) >= 0) return factor * .000001f; if ("in;inch;".indexOf(OldUnits + ";") >= 0) return factor * (float) (1.0 / 254.0); if ("ft;foot;feet;".indexOf(OldUnits + ";") >= 0) return factor * (float) (12.0 / 254.0); return factor * 1.0f; |