Java String Starts Wtih startsWith(String s, boolean caseIgnore, String... args)

Here you can find the source of startsWith(String s, boolean caseIgnore, String... args)

Description

starts With

License

Apache License

Declaration

public static boolean startsWith(String s, boolean caseIgnore,
            String... args) 

Method Source Code

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

public class Main {
    public static boolean startsWith(String s, boolean caseIgnore,
            String... args) {/*from  w  ww  .j av  a2 s .  co  m*/
        if (s == null) {
            return false;
        }
        for (String arg : args) {
            if (caseIgnore) {
                s = s.toLowerCase();
                arg = arg.toLowerCase();
            }
            if (s.startsWith(arg)) {
                return true;
            }
        }
        return false;
    }
}

Related

  1. startsWith(String n, char tag)
  2. startsWith(String partial, String possible)
  3. startsWith(String path, String prefix)
  4. startsWith(String prefix, String string, boolean caseInsensitive)
  5. startsWith(String receiver, String... needles)
  6. startsWith(String s, char begin)
  7. startsWith(String s, char c)
  8. startsWith(String s, int offset, int end, String t)
  9. startsWith(String s, String begin)