Java String Starts Wtih startsWithAnyCS(String str, String[] needles)

Here you can find the source of startsWithAnyCS(String str, String[] needles)

Description

starts With Any CS

License

Open Source License

Declaration

public static boolean startsWithAnyCS(String str, String[] needles) 

Method Source Code

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

public class Main {
    public static boolean startsWithAnyCS(String str, String[] needles) {
        if (str == null || str.length() == 0)
            return false;
        for (String n : needles) {
            if (str.startsWith(n))
                return true;
        }/*  w w  w. j  av a2 s.  co m*/
        return false;
    }
}

Related

  1. startsWithAny(String str, String... args)
  2. startsWithAny(String stringToMatch, String... stringToCheckEquals)
  3. startsWithAny(String text, String... prefixes)
  4. startsWithAny(String toMatch, String... startsWithAny)
  5. startsWithAnyCI(String string, String... prefixes)
  6. startsWithAnyIgnoreCase(String s, String... options)
  7. startsWithAnyIgnoreCase(String string, String... searchStrings)
  8. startsWithAnyOfThose(final String in, final String[] prefixes)
  9. startsWithAt(String text, String toFind, int offset)