Java String Starts Wtih startsWithPrefix(String inputText, String[] prefixes)

Here you can find the source of startsWithPrefix(String inputText, String[] prefixes)

Description

starts With Prefix

License

Apache License

Declaration

public static boolean startsWithPrefix(String inputText, String[] prefixes) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static boolean startsWithPrefix(String inputText, String[] prefixes) {
        for (int i = 0; i < prefixes.length; i++) {
            if (inputText.startsWith(prefixes[i])) {
                return true;
            }/*from  www  .j a  v a 2 s  . com*/
        }
        return false;
    }
}

Related

  1. startsWithOneOf(String string, String... prefixes)
  2. startsWithOrMatches(String s1, String s2)
  3. startsWithPattern(String value, String matchingPatterns)
  4. startsWithPhraseSeparator(char[] token)
  5. startsWithPrefix(final String methodName, final String prefix, final int prefixLength)
  6. startsWithQuote(String str)
  7. startsWithSeparator(String str)
  8. startsWithSeveralUpperCaseLetters(String string)
  9. startsWithSlash(String path)