Java String Ends With endsWith(char[] fieldDescriptor, char c)

Here you can find the source of endsWith(char[] fieldDescriptor, char c)

Description

ends With

License

Open Source License

Declaration

public static boolean endsWith(char[] fieldDescriptor, char c) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2004, 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
 *
 * Contributors:/*from   ww  w . j a  v a  2 s  . co m*/
 *     IBM Corporation - initial API and implementation
 *     Andrew Ferguson (Symbian)
 *     Markus Schorn (Wind River Systems)
 *     Sergey Prigogin (Google)
 *******************************************************************************/

public class Main {
    public static boolean endsWith(char[] fieldDescriptor, char c) {
        if (fieldDescriptor.length == 0) {
            return false;
        }
        return fieldDescriptor[fieldDescriptor.length - 1] == c;
    }
}

Related

  1. endsWith(byte[] bytes, String str)
  2. endsWith(byte[] dataFrom, String suffix)
  3. endsWith(byte[] source, char c)
  4. endsWith(byte[] subject, byte[] suffix)
  5. endsWith(char s[], int len, char suffix[])
  6. endsWith(CharSequence cs, CharSequence suffix)
  7. endsWith(CharSequence cs, String postfix)
  8. endsWith(CharSequence s, char c)
  9. endsWith(CharSequence s, char c)