Java String Starts Wtih startsWithCharacter(String str, char stringStart)

Here you can find the source of startsWithCharacter(String str, char stringStart)

Description

Checks if the string str starts with the given character

License

Apache License

Parameter

Parameter Description
current a parameter
stringStart a parameter

Declaration

public static boolean startsWithCharacter(String str, char stringStart) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/* w w w.  j  a va 2  s  .com*/
     * Checks if the string str starts with the given character
     * @param current
     * @param stringStart
     * @return
     */
    public static boolean startsWithCharacter(String str, char stringStart) {
        return str.length() > 0 && str.charAt(0) == stringStart;
    }
}

Related

  1. startsWithChar(CharSequence s, char prefix)
  2. startsWithChar(final String s, final char c)
  3. startsWithChar(String s, char c)
  4. startsWithChar(String string, char prefix)
  5. startsWithChar(String string, int character)
  6. startsWithCharacter(String str, String matchChars)
  7. startsWithCommonPackagePrefix(String inputText)
  8. startsWithConcatenation(String string, String... prefixes)
  9. startsWithConcatenationOf(String testee, String firstPrefix, String secondPrefix)