Re: fstrcmp
On Sunday 31 May 2009 03:49:37 Peter Miller wrote:
[...]
>This goes for packages as well. Wouldn't it be great if
>
> apt-get install dns-utils
>
>instead of saying
>
> E: Couldn't find package dns-utils
>
>it said something more useful, like
>
> E: Couldn't find package dns-utils, did you mean dnsutils instead?
It is naive to think matching algorithm iterates on all items until it
find the correct one. At least, algorithm use a sorted index with a
dichotomy search.
Nevertheless, your idea is interesting. But you should implement a
function to match the nearest string in a set of strings. Take a look in
spell checking libraries to have an idea how to implement it.
--
Jérôme Pouiller (jezz AT sysmic DOT org)
Reply to: