Java String Starts Wtih startsWithWhitespace(final CharSequence charSeq)

Here you can find the source of startsWithWhitespace(final CharSequence charSeq)

Description

Finds out if the given character sequence starts with a whitespace character.

License

Open Source License

Return

true if the given character sequence is not empty and starts with a whitespace character; false otherwise

Declaration

public static boolean startsWithWhitespace(final CharSequence charSeq) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from  www.ja v a2s.  c o m
     * Finds out if the given character sequence starts with a whitespace
     * character.
     *
     * @return  {@code true} if the given character sequence is not empty
     *          and starts with a whitespace character; {@code false} otherwise
     * @exception  NullPointerException  if the given character sequence is
     *             {@code null}
     */
    public static boolean startsWithWhitespace(final CharSequence charSeq) {
        if (charSeq.length() == 0) {
            return false;
        }
        return Character.isWhitespace(charSeq.charAt(0));
    }
}

Related

  1. startsWithVowel(String string)
  2. startsWithVowel(String text)
  3. startsWithVowel(String value)
  4. startsWithVowel(String word)
  5. startsWithWeight(String s1, String s2)
  6. startsWithWhitespace(String s)
  7. startsWithWithoutBeingFollowedByLetter(String s, String compareTo)
  8. startsWithWovel(String s)