int n = a.length; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (Math.abs(a[i][j]) < precision) { a[i][j] = 0; return a;
if (aString == null) { return null; if (aString.length() == 0) { return ""; if (aString.length() == 1) { return ""; ...
if (line.endsWith("\r\n")) { return line.substring(0, line.length() - 2); if (line.endsWith("\n")) { return line.substring(0, line.length() - 1); if (line.endsWith("\r")) { return line.substring(0, line.length() - 1); ...
if (s == null) { return (null); if (s.length() == 1) { return (new String()); s = s.substring(0, (s.length() - 1)); return (s); ...
if (s == null) return null; if (maxLength <= s.length()) return s; return s.substring(0, maxLength - 1) + " ...";
int index = -1; if (0 <= (index = src.lastIndexOf(delim))) { return src.substring(0, index); } else { return src;
if (str == null) { return null; int strLen = str.length(); if (strLen < 2) { return ""; int lastIdx = strLen - 1; ...
Remove the last character from a String.
if ("".equals(str)) { return ""; if (str.length() == 1) { return ""; int lastIdx = str.length() - 1; String ret = str.substring(0, lastIdx); ...