List of utility methods to do String Starts Wtih
String | startsWithSlash(String url) starts With Slash return url.startsWith("/") ? url : "/" + url; |
boolean | startsWithSpace(String s) starts With Space if (s != null && s.length() > 0) { char first = s.charAt(0); if (first == ' ') return true; return false; |
boolean | startsWithSpaces(final String text) starts With Spaces final char ch = text.charAt(0); return Character.isWhitespace(ch); |
boolean | startsWithTag(String html, int position) starts With Tag return html.charAt(position) == '<'; |
boolean | startsWithUppercase(String str) Returns true if the given string starts with an uppercase letter.
if (str.length() == 0) { return false; return isUppercase(str.charAt(0)); |
boolean | startsWithUpperCase(String text) starts With Upper Case return Character.isUpperCase(text.charAt(0));
|
boolean | startsWithURIScheme(String arg) Determines if a prefix of the specified String is conform to an URI definition. if (arg == null || arg.length() == 0) return false; char c = arg.charAt(0); int i = arg.indexOf(':'); if (i < 1 || !isAsciiLetter(c)) return false; while (--i > 0) { c = arg.charAt(i); ... |
boolean | startsWithVowel(String string) starts With Vowel char[] stringChars = string.toCharArray(); vowelLoop: for (char c : VOWELS) { for (char c2 : stringChars) { if (Character.isLetter(c2)) { if (c2 == c) { return true; } else { continue vowelLoop; ... |
boolean | startsWithVowel(String text) starts With Vowel text = text.toUpperCase(); return text.startsWith("A") || text.startsWith("E") || text.startsWith("I") || text.startsWith("O") || text.startsWith("U"); |
boolean | startsWithVowel(String value) Check to see if the string starts with a vowel. if ((value == null) || value.equals("")) { return false; char lower = Character.toLowerCase(value.charAt(0)); return (lower == 'a') || (lower == 'e') || (lower == 'i') || (lower == 'o') || (lower == 'u'); |