Here you can find the source of startsWithIgnoreCase(String[] compoundName, String[] prefix)
public static boolean startsWithIgnoreCase(String[] compoundName, String[] prefix)
//package com.java2s; /******************************************************************************* * Copyright (c) 2005, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ public class Main { public static boolean startsWithIgnoreCase(String[] compoundName, String[] prefix) { int prefixLength = prefix.length; int nameLength = compoundName.length; if (prefixLength > nameLength) return false; for (int i = 0; i < prefixLength - 1; i++) { if (!compoundName[i].equalsIgnoreCase(prefix[i])) return false; }//from www .ja v a 2 s . c om return compoundName[prefixLength - 1].toLowerCase().startsWith(prefix[prefixLength - 1].toLowerCase()); } }