Here you can find the source of endsWithIgnoreCase(String seq, String suffix)
Parameter | Description |
---|---|
seq | a parameter |
suffix | a parameter |
public static boolean endsWithIgnoreCase(String seq, String suffix)
//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 . ja v a2 s . com * IBM Corporation - initial API and implementation *******************************************************************************/ public class Main { /** * Tests if this string sequence ends with the specified suffix. * @param seq * @param suffix * @return true if the character sequence represented by 'suffix' is a suffix of the character sequence represented by 'seq'; false otherwise. */ public static boolean endsWithIgnoreCase(String seq, String suffix) { return seq.toLowerCase().endsWith(suffix.toLowerCase()); } }