Java String Last Index Of lastIndexOfUCL(String value)

Here you can find the source of lastIndexOfUCL(String value)

Description

last Index Of UCL

License

Open Source License

Declaration

public static int lastIndexOfUCL(String value) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2012 Huygens ING./* w  w  w. j a va  2s  . c  o  m*/
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     Huygens ING - initial API and implementation
 ******************************************************************************/

public class Main {
    public static int lastIndexOfUCL(String value) {
        for (int i = value.length() - 1; i >= 0; i--) {
            if (Character.isUpperCase(value.charAt(i))) {
                return i;
            }
        }
        return -1;
    }
}

Related

  1. lastIndexOfNewline(CharSequence theChars, int aStart)
  2. lastIndexOfNonWhitespace(final String src)
  3. lastIndexOfOrdinal(String value, String part, int startIndex, int count, boolean caseSensitive)
  4. lastIndexOfPathSeparator(String str)
  5. lastIndexOfSeparator(String path)
  6. lastIndexOfUnnested(String str, char chr, String openBalance, String closeBalance)
  7. lastIndexOfWhitespace(String s)