List of utility methods to do String Left
String | left(final String s, final int len) Gets the leftmost len characters of a String. if (s == null) { return null; if (len < 0) { return ""; if (s.length() <= len) { return s; ... |
String | left(final String string, final int length) Returns leftmost characters of a string. if (string == null || string.length() < length) { return string; return string.substring(0, length); |
String | left(final String text, final String sep) left final int pos = text.indexOf(sep); if (pos != -1) { return text.substring(0, pos); return text; |
String | left(Object src, int length, String defaultValue) left if (src != null) { String temp = src.toString(); if (temp.length() >= length) { return temp.substring(0, length); return temp; return defaultValue; ... |
String | left(String baseString, int pos) left int diLength; if (baseString == null || pos <= 0) { return null; } else { diLength = baseString.length(); if (diLength < pos) { return baseString.substring(0); } else { ... |
String | left(String s, int l) left returns the left most characters of a string try { return s.substring(0, l); } catch (StringIndexOutOfBoundsException e) { return s; |
String | left(String s, int len) Gets the leftmost n characters of a string. if (len < 0) throw new IllegalArgumentException("Requested String length " + len + " is less than zero"); return ((s == null) || (s.length() <= len)) ? s : s.substring(0, len); |
String | left(String s, int nCaratteri) left if (s == null) return null; if (nCaratteri < 1) return ""; if (nCaratteri >= s.length()) return s; return s.substring(0, nCaratteri); |
String | left(String s, int size) Basic-like Left$ function. return s.substring(0, Math.min(size, s.length()));
|
String | left(String s, int width) Left justify a string, padding with spaces. return left(s, width, ' '); |