List of utility methods to do String Starts Wtih
boolean | startsWith(CharSequence cs, CharSequence prefix, boolean caseSensitive) Tests if a char sequence starts with some prefix return startsWith(cs, prefix, 0, caseSensitive);
|
boolean | startsWith(CharSequence input, String prefix) starts With if (input.length() < prefix.length()) { return false; if (input.getClass() == String.class) { return ((String) input).startsWith(prefix); int len = prefix.length(); for (int i = 0; i < len; i++) { ... |
boolean | startsWith(CharSequence s, CharSequence seq) Behaves like String.startsWith but for CharSequence .
return regionMatches(false, s, 0, seq, 0, seq.length());
|
boolean | startsWith(CharSequence seq, char... any) starts With if (seq.length() > 0) { for (int i = 0; i < any.length; i++) { if (seq.charAt(0) == any[i]) return true; return false; |
boolean | startsWith(CharSequence seq, String str) Implementation of String.startsWith() for CharSequence. boolean ret = true; for (int i = 0; i < str.length(); i++) { if (i >= seq.length() || seq.charAt(i) != str.charAt(i)) { ret = false; break; return ret; ... |
boolean | startsWith(CharSequence source, CharSequence search) Returns true if the source sequence starts with the search sequence. return containsAt(source, search, 0);
|
boolean | startsWith(CharSequence str, char prefix) starts With if (str == null) { return false; if (str.length() < 1) { return false; char firstCh = str.charAt(0); return (firstCh == prefix); ... |
boolean | startsWith(CharSequence str, CharSequence prefix) Return true if one CharSequence starts with the other. return startsWith(str, prefix, 0);
|
boolean | startsWith(final boolean caseSensitive, final char[] text, final char[] prefix) Checks whether a text starts with a specified prefix. return startsWith(caseSensitive, text, 0, text.length, prefix, 0, prefix.length);
|
boolean | startsWith(final CharSequence str, final CharSequence prefix) starts With return startsWith(str, 0, str.length(), prefix);
|