private boolean stringMatch(String str,OcrResultIterator iter){
  OcrResultIterator iterCopy=new OcrResultIterator(iter);
  for (int pos=0; pos < str.length(); ++pos) {
    if (!charMatch(str.charAt(pos),iterCopy.getCurrentChar()))     return false;
    if (pos != str.length() - 1 && !iterCopy.hasNext())     return false;
    iterCopy.moveToNext();
  }
  return true;
}

private boolean stringMatch ( String str , OcrResultIterator iter ) { OcrResultIterator iterCopy = new OcrResultIterator ( iter ) ; for ( int pos = 0 ; pos < str . length ( ) ; ++ pos ) { if ( ! charMatch ( str . charAt ( pos ) , iterCopy . getCurrentChar ( ) ) ) return false ; if ( pos != str . length ( ) - 1 && ! iterCopy . hasNext ( ) ) return false ; iterCopy . moveToNext ( ) ; } return true ; }
returns true if string matches ocrresult from position pointed by iterator .
