Here you can find the source of startsWithIgnoreWhitespace(String str, String prefix)
public static boolean startsWithIgnoreWhitespace(String str, String prefix)
//package com.java2s; public class Main { public static boolean startsWithIgnoreWhitespace(String str, String prefix) { return str.matches("(\\s|\\t)*" + prefix + ".*"); }//from ww w .java 2 s .c o m }