private static boolean startsWith(final String s, final String prefix, final boolean ignoreCase) {
        if (s == null || prefix == null) {
            return s == null && prefix == null;
        }
        if (prefix.length() > s.length()) {
            return false;
        }
        return s.toString().regionMatches(ignoreCase, 0, prefix.toString(), 0, prefix.length());
    }
private static boolean startsWith(final String s, final String prefix, final boolean ignoreCase) {
        if (s == null || prefix == null) {
            return s == null && prefix == null;
        }
        if (prefix.length() > s.length()) {
            return false;
        }
        return s.toString().regionMatches(ignoreCase, 0, prefix.toString(), 0, prefix.length());
    }
private static boolean startsWith ( final String s , final String prefix , final boolean ignoreCase ) { if ( s == null || prefix == null ) { return s == null && prefix == null ; } if ( prefix . length ( ) > s . length ( ) ) { return false ; } return s . toString ( ) . regionMatches ( ignoreCase , 0 , prefix . toString ( ) , 0 , prefix . length ( ) ) ; }
<p>
Check if a String starts with a specified prefix (optionally case
insensitive).
</p>

@see java.lang.String#startsWith(String)
<p > Check if a String starts with a specified prefix ( optionally case insensitive ) . < / p >