strmatch              package:cwhstring              R Documentation

_A "_s_h_o_r_t_e_s_t _u_n_i_q_u_e _i_d_e_n_t_i_f_i_e_r" _m_a_t_c_h.

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

     strmatch(inputs, target)

_A_r_g_u_m_e_n_t_s:

  inputs: The string to be found as a match.

  target: The string which should contain the match.

_V_a_l_u_e:

     The matched string, if it exists. NA, if 'input' matches no output
     string. 0 , if ambiguous matches are found.

_N_o_t_e:

     Uses  .C("strmatch",  which is Not Found in R ??!

_A_u_t_h_o_r(_s):

     ? from SCCS: \@(#)strmatch.s   2.2  1989-09-27

_E_x_a_m_p_l_e_s:

     # strmatch(c("he","we"), c("She will","in awe","xxxx"))

