Find location of word (not case-insensitive) in string list.
Syntax: @wfindnc(str_list, str_cmp)
str_list: string
str_cmp: string
Return: integer
Looks for 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 similar to the
@wfind function, but is not case-sensitive
• Note that this function works only on single words; for multiple or parts of words, use
@instr.
Examples
@wfindnc("I did it", "DID")
returns the number 2, indicating the caseless string “did” is second in the list.
@wfindnc("I did not do it", "i")
returns the number 1, since the first “i” or “I” encountered was in the first position.
If ALPHA1 is an alpha series,
series stfind = @wfindnc(alpha1, "did")
returns the 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 = @wfindnc(svec1, "I")
returns the position of the string word “I” caselessly matching words in the string lists in each element of SVEC1.
Cross-references