Java String Starts Wtih startsWithPrefix(final String methodName, final String prefix, final int prefixLength)

Here you can find the source of startsWithPrefix(final String methodName, final String prefix, final int prefixLength)

Description

starts With Prefix

License

Open Source License

Declaration

protected static boolean startsWithPrefix(final String methodName, final String prefix,
            final int prefixLength) 

Method Source Code

//package com.java2s;
/**/*from  w w  w.  ja  v  a2 s .c o m*/
 * Copyright (c) 2015 itemis AG (http://www.itemis.eu) 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 {
    protected static boolean startsWithPrefix(final String methodName, final String prefix,
            final int prefixLength) {
        return (((methodName.length() > prefixLength) && methodName.startsWith(prefix))
                && Character.isUpperCase(methodName.charAt(prefixLength)));
    }
}

Related

  1. startsWithOneOf(String str, String... strs)
  2. startsWithOneOf(String string, String... prefixes)
  3. startsWithOrMatches(String s1, String s2)
  4. startsWithPattern(String value, String matchingPatterns)
  5. startsWithPhraseSeparator(char[] token)
  6. startsWithPrefix(String inputText, String[] prefixes)
  7. startsWithQuote(String str)
  8. startsWithSeparator(String str)
  9. startsWithSeveralUpperCaseLetters(String string)