List of utility methods to do String Starts Wtih
boolean | startsWithOneOf(String string, String... prefixes) Returns true if the given string starts with one of the given prefixes.
for (String prefix : prefixes) { if (string.startsWith(prefix)) { return true; return false; |
boolean | startsWithOrMatches(String s1, String s2) Combination of startsWith and matches string comparison. if (s1 == null) { return s2 == null; if (s2 == null) { return false; return s1.startsWith(s2) || s1.matches(s2); |
String | startsWithPattern(String value, String matchingPatterns) starts With Pattern return startsWithPattern(value, matchingPatterns, ","); |
boolean | startsWithPhraseSeparator(char[] token) Check if token starts with a phrase separator return token.length > 0 && isPhraseSeparator(token[0]);
|
boolean | startsWithPrefix(final String methodName, final String prefix, final int prefixLength) starts With Prefix return (((methodName.length() > prefixLength) && methodName.startsWith(prefix))
&& Character.isUpperCase(methodName.charAt(prefixLength)));
|
boolean | startsWithPrefix(String inputText, String[] prefixes) starts With Prefix for (int i = 0; i < prefixes.length; i++) { if (inputText.startsWith(prefixes[i])) { return true; return false; |
boolean | startsWithQuote(String str) Gets whether string starts with quote. if (str.length() == 0) { return false; return str.trim().charAt(0) == '"'; |
boolean | startsWithSeparator(String str) starts With Separator return str != null && (str.startsWith("/") || str.startsWith("\\")); |
boolean | startsWithSeveralUpperCaseLetters(String string) starts With Several Upper Case Letters return string.length() > 1 && Character.isUpperCase(string.charAt(0))
&& Character.isUpperCase(string.charAt(1));
|
boolean | startsWithSlash(String path) starts With Slash return path.charAt(0) == '/'; |