Java String Starts Wtih startsWithAcronym(String word)

Here you can find the source of startsWithAcronym(String word)

Description

starts With Acronym

License

Open Source License

Declaration

public static boolean startsWithAcronym(String word) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static final String ALPHANUMERIC_REGEX = "^[a-zA-Z0-9]*$";

    public static boolean startsWithAcronym(String word) {
        return word.length() >= 2 && Character.isUpperCase(word.charAt(0)) && Character.isUpperCase(word.charAt(1))
                && word.matches(ALPHANUMERIC_REGEX);
    }/*from   www  .  ja v  a  2s  .c  o  m*/
}

Related

  1. startsWith(StringBuffer buffer, String prefix)
  2. startsWith(StringBuilder builder, String prefix, int offset)
  3. startsWith(StringBuilder sb, String prefix)
  4. startsWith(T[] arr, T[] prefix)
  5. startsWith4(String string, int startIndex, int char1, int char2, int char3, int char4)
  6. startsWithAndHasMore(String input, String toStartWith)
  7. startsWithAny(String _str, String... _startStrings)
  8. startsWithAny(String s, String... options)
  9. startsWithAny(String source, String[] checks)