Here you can find the source of startsWithWhitespace(final CharSequence charSeq)
public static boolean startsWithWhitespace(final CharSequence charSeq)
//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)); } }