Number of word elements.
Syntax: @wcount(str_list)
str_list: string
Return: integer
Returns the number of word elements in the string list.
Example:
The commands
string s1 = "I did not do it"
@wcount("I did not do it")
@wcount(s1)
return the number 5.
If ALPHA1 is an alpha series,
scalar alphalwr = @wcount(alpha1)
returns the number of words in the strings in ALPHA1 for each observation in the workfile sample.
If SVEC1 is an string vector,
vector sveclen = @wcount(svec1)
returns a the number of elements in each of the strings in SVEC1.
Cross-references
See also
@len for the length of the strings.