Darwin Help

Back to Index

HammingSearchString

Function HammingSearchString


Calling Sequence  HammingSearchString(pat,txt,tol)
Parameters
NameTypeDescription

pat string 
txt string 
tol {0, posint} 
Return Type  {-1,posint}
Synopsis This function is almost identical to ApproxSearchString. The only difference is that insertions and deletions are not allowed.
Examples
> txt := 'AAAAAAAAAHeLLoBBBBB';
txt := AAAAAAAAAHeLLoBBBBB
> j := HammingSearchString('hallo', txt, 1);
j := 9
> j+txt;
HeLLoBBBBB
> HammingSearchString('aahllo', txt, 1);
-1




See also ApproxSearchString,   BestSearchString,   CaseSearchString,   SearchDelim,   SearchMultipleString,   SearchString