next up previous contents
Next: Ordered Searches Up: Searching Functions Previous: Approximate string Search

Best String Match

Calling Sequence:
SearchString(pat, text)
Parameters:
pat : string
text : string

Returns: {0, posint}

Synopsis: The SearchString function returns the best match of pat in the body of text text. If no match is found, it takes the first match (index 0).

Examples:

> SearchString('CYIQNCPRG', 'PPATBCYTQNCPLGFPTTSPS');
> SearchString('CYIQNCPRG', 'XXXXXXXXXXXXXXXXX');  # just take the first

See also: CaseSearchString, SearchString, ApproxSearchString




Gaston Gonnet
1998-09-15