List of utility methods to do String Trim
String | trimStart(String s) Trim characters from only the beginning of a string. return trimStart(s, null);
|
String | trim(String str) trim return str == null ? null : str.trim();
|
String | trimToNull(String str) trim To Null return isBlank(str) ? null : trim(str);
|
String[] | splitAndTrim(String str, String delims) split And Trim return split(str, delims, true);
|
String | trimEnd(String s) Trim characters from only the end of a string. return trimEnd(s, null);
|
String | nullsafeTrim(String str) nullsafe Trim return TextUtils.isEmpty(str) ? str : str.trim();
|
String | trimScheme(String uri) trim Scheme if (uri.regionMatches(0, ContentResolver.SCHEME_FILE, 0, sFileSchemeLength)) { return uri.substring(sFileSchemeLength + sSuffixLength); } else if (uri.regionMatches(0, ContentResolver.SCHEME_CONTENT, 0, sContentSchemeLength)) { return uri.substring(sContentSchemeLength + sSuffixLength); return uri; ... |
String | ltrim(final String text) ltrim return ltrim(text, null);
|
String | ltrim(final String text, String trimText) ltrim if (text == null) { return null; if (trimText == null) { trimText = " "; int pos = 0; for (; pos < text.length(); pos++) { ... |
String | rtrim(final String text) rtrim return rtrim(text, null);
|