Java String Starts Wtih startsWith(String comparee, char comparant)

Here you can find the source of startsWith(String comparee, char comparant)

Description

starts With

License

Open Source License

Declaration

private static boolean startsWith(String comparee, char comparant) 

Method Source Code

//package com.java2s;
/**//from  w  w w  . jav a  2s .  c  o  m
 * This class holds various utility methods.
 * 
 * @author Yanick Duchesne
 *         <dl>
 *         <dt><b>Copyright: </b>
 *         <dd>Copyright &#169; 2002-2007 <a
 *         href="http://www.sapia-oss.org">Sapia Open Source Software </a>. All
 *         Rights Reserved.</dd>
 *         </dt>
 *         <dt><b>License: </b>
 *         <dd>Read the license.txt file of the jar or visit the <a
 *         href="http://www.sapia-oss.org/license.html">license page </a> at the
 *         Sapia OSS web site</dd>
 *         </dt>
 *         </dl>
 */

public class Main {
    private static boolean startsWith(String comparee, char comparant) {
        if (comparee.length() == 0)
            return false;
        return comparee.charAt(0) == comparant;
    }
}

Related

  1. startsWith(final String str, final char prefix)
  2. startsWith(final String str, final String... prefixes)
  3. startsWith(String baseString, String compareString)
  4. startsWith(String check, String doesStartWith)
  5. startsWith(String cid1, String cid2)
  6. startsWith(String inStart, String inValue)
  7. startsWith(String n, char tag)
  8. startsWith(String partial, String possible)
  9. startsWith(String path, String prefix)