next up previous contents
Next: Procedures Up: Approximate string Search Previous: ApproxSearchString

BestSearchString

The BestSearchString function
BestSearchString(pattern : name, target : name)
finds the match of a pattern against a body of text which minimizes the total number of mismatches. It returns an offset to the character directly before where this best match occurs.

> BestSearchString('CYIQNCPRG', 'PPATBCYTQNCPLGFPTTSPS');
5
> BestSearchString('CYIQNCPRG', 'XXXXXXXXXXXXXXXXX');  
>                                            # just take the first
0



Gaston Gonnet
1998-09-15