Java Utililty Methods String Starts Wtih

List of utility methods to do String Starts Wtih

Description

The list of methods to do String Starts Wtih are organized into topic(s).

Method

booleanstartsWithVowel(String word)
starts With Vowel
if (word.length() == 0)
    return false;
char firstLetter = word.toLowerCase().charAt(0);
return vowels.indexOf(firstLetter) > -1;
intstartsWithWeight(String s1, String s2)
Return the number of starting letters that s1 and s2 have in common before they deviate.
if ((s1 == null) || (s2 == null)) {
    return 0;
char[] chars1 = s1.toCharArray();
char[] chars2 = s2.toCharArray();
int i = 0;
for (; (i < chars1.length) && (i < chars2.length); i++) {
    if (chars1[i] != chars2[i]) {
...
booleanstartsWithWhitespace(final CharSequence charSeq)
Finds out if the given character sequence starts with a whitespace character.
if (charSeq.length() == 0) {
    return false;
return Character.isWhitespace(charSeq.charAt(0));
booleanstartsWithWhitespace(String s)
starts With Whitespace
return (s.length() > 0) && Character.isWhitespace(s.charAt(0));
booleanstartsWithWithoutBeingFollowedByLetter(String s, String compareTo)
starts With Without Being Followed By Letter
if (s.startsWith(compareTo)) {
    if (s.length() == compareTo.length())
        return true;
    char next = s.charAt(compareTo.length());
    if (Character.isLetter(next))
        return false;
    return true;
return false;
booleanstartsWithWovel(String s)
starts With Wovel
return s != null && s.length() > 0 && isWovel(s.charAt(0));