Java String Starts Wtih startsWithIgnoreCase(String searchIn, int startAt, String searchFor)

Here you can find the source of startsWithIgnoreCase(String searchIn, int startAt, String searchFor)

Description

Determines whether or not the string 'searchIn' contains the string 'searchFor', dis-regarding case starting at 'startAt' Shorthand for a String.regionMatch(...)

License

Open Source License

Parameter

Parameter Description
searchIn the string to search in
startAt the position to start at
searchFor the string to search for

Return

whether searchIn starts with searchFor, ignoring case

Declaration

public static boolean startsWithIgnoreCase(String searchIn, int startAt, String searchFor) 

Method Source Code

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

public class Main {
    /**//from  ww w  .java 2 s  . c  om
     * Determines whether or not the string 'searchIn' contains the string
     * 'searchFor', dis-regarding case starting at 'startAt' Shorthand for a
     * String.regionMatch(...)
     *
     * @param searchIn  the string to search in
     * @param startAt   the position to start at
     * @param searchFor the string to search for
     * @return whether searchIn starts with searchFor, ignoring case
     */
    public static boolean startsWithIgnoreCase(String searchIn, int startAt, String searchFor) {
        return searchIn.regionMatches(true, startAt, searchFor, 0, searchFor.length());
    }
}

Related

  1. startsWithIgnoreCase(String s, String prefix)
  2. startsWithIgnoreCase(String s, String prefix)
  3. startsWithIgnoreCase(String s, String start)
  4. startsWithIgnoreCase(String s, String w)
  5. startsWithIgnoreCase(String searchIn, int startAt, String searchFor)
  6. startsWithIgnoreCase(String searchIn, String searchFor)
  7. startsWithIgnoreCase(String seq, String prefix)
  8. startsWithIgnoreCase(String startString, String anotherString)
  9. startsWithIgnoreCase(String str, String prefix)