Command Reference : Function Reference : Function Reference: W
  
 
@wrfindnc
Find location of a word (not case-sensitive) in a string list searching from end.
Syntax: @wrfindnc(str_list, str_cmp)
str_list: string
str_cmp: string
Return: integer
Looks for last occurrence of the string str_cmp in the string list str_list, and returns the position in the list or 0 if the string is not in the list.
This function is the non-case-sensitive version of the @wrfind function.
Note that this function works only on single words; for multiple or partial words, use @rinstr.
Examples
= @wrfindnc("I did it. Did you?", "DID")
returns the number 4, indicating the last caseless string “did” is 4th in the list.
= @wrfindnc("I did not do it. I left early.", "i")
returns the number 6, since the last “i” or “I” word was in the 6th position.
If ALPHA1 is an alpha series,
series stfind = @wrfindnc(alpha1, "did")
returns the last position of the string word “did” caselessly matching the string list values of ALPHA1 for each observation in the workfile sample.
If SVEC1 is an string vector,
vector stfind = @wrfindnc(svec1, "I")
returns the last position of the string word “I” caselessly matching words in the string lists in each element of SVEC1.
Cross-references
See also @rinstr, @wrfind, @wfind, and @wfindnc.