Java String Start With startWith(String source, String target)

Here you can find the source of startWith(String source, String target)

Description

start With

License

Open Source License

Declaration

private static boolean startWith(String source, String target) 

Method Source Code

//package com.java2s;

public class Main {
    private static boolean startWith(String source, String target) {
        if (source.length() < target.length()) {
            return false;
        }/*from w  w  w  .ja  va2 s .co m*/
        String sub = source.substring(0, target.length());
        return target.equalsIgnoreCase(sub);
    }
}

Related

  1. startWith(String str, String prefix)
  2. startWith(String str, String start)
  3. startWith(String string, String prefix)
  4. startWith(String string1, String string2)