private boolean hasSubstring(final String value,final int start,final String substring){
  try {
    if (start < 0) {
      return false;
    }
    final int end=start + substring.length();
    if (end > value.length()) {
      return false;
    }
    for (int i=0, pos=start; pos < end; i++, pos++) {
      if (value.charAt(pos) != substring.charAt(i)) {
        return false;
      }
    }
    return true;
  }
 catch (  final Exception e) {
    logger.debug(LocalizableMessage.raw("Unable to check that '%s' has substring '%s' at position %d: %s",value,substring,start,e));
    return false;
  }
}

private boolean hasSubstring ( final String value , final int start , final String substring ) { try { if ( start < 0 ) { return false ; } final int end = start + substring . length ( ) ; if ( end > value . length ( ) ) { return false ; } for ( int i = 0 , pos = start ; pos < end ; i ++ , pos ++ ) { if ( value . charAt ( pos ) != substring . charAt ( i ) ) { return false ; } } return true ; } catch ( final Exception e ) { logger . debug ( LocalizableMessage . raw ( "Unable to check that '%s' has substring '%s' at position %d: %s" , value , substring , start , e ) ) ; return false ; } }
indicates whether the provided value has the given substring at the specified position .
