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

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

Description

starts With Ignore Case

License

Open Source License

Declaration

public static boolean startsWithIgnoreCase(String thisString, String prefix) 

Method Source Code

//package com.java2s;
/*/*from   w ww.ja  va  2  s . com*/
* Copyright (c) 2010-2012 Research In Motion Limited. All rights reserved.
*
* This program and the accompanying materials are made available
* under  the terms of the Apache License, Version 2.0,
* which accompanies this distribution and is available at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* To use this code further you must also obtain a valid copy of
* InstallAnywhere 8.0 Enterprise/resource/IAClasses.zip
* Please visit http://www.flexerasoftware.com/products/installanywhere.htm for the terms.
* 
* Additionally, for the Windows(R) installer you must obtain a valid copy of vcredist_x86.exe
* Please visit http://www.microsoft.com/en-us/download/details.aspx?id=29 for the terms.
* 
*/

public class Main {
    public static boolean startsWithIgnoreCase(String thisString, String prefix) {
        String temp = thisString.substring(0, Math.min(prefix.length(), thisString.length()));
        return temp.equalsIgnoreCase(prefix);
    }
}

Related

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