Here you can find the source of startsWithIgnoreCase(String thisString, String prefix)
public static boolean startsWithIgnoreCase(String thisString, String prefix)
//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); } }