Java String Starts Wtih startsWithIgnoreCase(String whole, String prefix)

Here you can find the source of startsWithIgnoreCase(String whole, String prefix)

Description

starts With Ignore Case

License

Open Source License

Declaration

public static boolean startsWithIgnoreCase(String whole, String prefix) 

Method Source Code

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

public class Main {
    public static boolean startsWithIgnoreCase(String whole, String prefix) {
        return whole.length() >= prefix.length() && whole.substring(0, prefix.length()).equalsIgnoreCase(prefix);
    }//from  w ww .  ja  va  2  s  . c o m

    public static String substring(String text, int begin, int end) {
        return text.substring(Math.min(text.length(), begin), Math.min(text.length(), end));
    }
}

Related

  1. startsWithIgnoreCase(String str1, String str2)
  2. startsWithIgnoreCase(String string1, String string2)
  3. startsWithIgnoreCase(String text, String prefix)
  4. startsWithIgnoreCase(String text, String value)
  5. startsWithIgnoreCase(String thisString, String prefix)
  6. startsWithIgnoreCase(String[] compoundName, String[] prefix)
  7. startsWithIgnoreCaseAndNonAlphaNumeric(String searchIn, String searchFor)
  8. startsWithIgnoreCaseAndWs(String searchIn, String searchFor)
  9. startsWithIgnoreCaseAndWs(String searchIn, String searchFor, int beginPos)