private OcrResultIterator findString(String str,OcrResult result){
  OcrResultIterator iter=new OcrResultIterator(result);
  while (iter.hasNext()) {
    if (stringMatch(str,iter))     return iter;
    iter.moveToNext();
  }
  return null;
}

private OcrResultIterator findString ( String str , OcrResult result ) { OcrResultIterator iter = new OcrResultIterator ( result ) ; while ( iter . hasNext ( ) ) { if ( stringMatch ( str , iter ) ) return iter ; iter . moveToNext ( ) ; } return null ; }
very inefficient implementation of string search
