Here you can find the source of startsWithIgnoreCase(String seq, String prefix)
Parameter | Description |
---|---|
seq | a parameter |
prefix | a parameter |
public static boolean startsWithIgnoreCase(String seq, String prefix)
//package com.java2s; /******************************************************************************* * Copyright (c) 2015 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 * * Contributors://from ww w .j av a 2 s . co m * IBM Corporation - initial API and implementation *******************************************************************************/ public class Main { /** * Tests if the string sequence starts with the specified prefix, case insensitive. * @param seq * @param prefix * @return true if the character sequence represented by 'prefix' is a prefix of the character sequence represented by 'seq'; false otherwise. */ public static boolean startsWithIgnoreCase(String seq, String prefix) { return seq.toLowerCase().startsWith(prefix.toLowerCase()); } }