strmatch {cwhmisc} | R Documentation |
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.
strmatch(inputs, target)
inputs |
The string to be found as a match. |
target |
The string which should contain the match. |
The matched string, if it exists.
NA, if input
matches no output string.
0 , if ambiguous matches are found.
Uses .C("strmatch", which is Not Found in R ??!
? from SCCS: \@(\#)strmatch.s 2.2 1989-09-27
# strmatch(c("he","we"), c("She will","in awe","xxxx"))