If an input string matches no output string, return NA.
If it is an ambiguous match, return 0.
Otherwise return the index of the match.
Exception: if the target string contains "log" and "logistic", and the
user type "lo" it is ambiguous, but if he types "log" consider it a
perfect match.
Usage
strmatch(inputs, target)
Arguments
inputs
The string to be found as a match.
target
The string which should contain the match.
Value
The matched string, if it exists.
NA, if input matches no output string.
0 , if ambiguous matches are found.