Java String Starts Wtih startsWithIgnoreWhitespace(String str, String prefix)

Here you can find the source of startsWithIgnoreWhitespace(String str, String prefix)

Description

starts With Ignore Whitespace

License

Open Source License

Declaration

public static boolean startsWithIgnoreWhitespace(String str, String prefix) 

Method Source Code

//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
}

Related

  1. startsWithIgnoreCase(String whole, String prefix)
  2. startsWithIgnoreCase(String[] compoundName, String[] prefix)
  3. startsWithIgnoreCaseAndNonAlphaNumeric(String searchIn, String searchFor)
  4. startsWithIgnoreCaseAndWs(String searchIn, String searchFor)
  5. startsWithIgnoreCaseAndWs(String searchIn, String searchFor, int beginPos)
  6. startsWithIgnoreWhitespaces(String prefix, String string)
  7. startsWithIndex(String[] prefixes, String fullPath)
  8. startsWithLenient(final String s, final String[] matches, final int[] minChars, final boolean acceptTrailing)
  9. startsWithLetter(String str)