public static String removeLeft ( final String value , final String prefix , final boolean caseSensitive ) { validate ( value , NULL_STRING_PREDICATE , NULL_STRING_MSG_SUPPLIER ) ; validate ( prefix , NULL_STRING_PREDICATE , NULL_STRING_MSG_SUPPLIER ) ; if ( caseSensitive ) { return value . startsWith ( prefix ) ? value . substring ( prefix . length ( ) ) : value ; } return value . toLowerCase ( ) . startsWith ( prefix . toLowerCase ( ) ) ? value . substring ( prefix . length ( ) ) : value ; }
Returns a new String with the prefix removed if present .