Length of a string
Syntax: @len(str)
str: string,
Return: integer
Returns integer values for the length of the string str.
Equivalent to @length.
Examples
The commands
string orig = "I did not do it"
@len("I did not do it")
@len(orig)
return the value 15.
If ALPHA1 is an alpha series,
series s1 = @len(alpha)
returns the length of the string values of ALPHA1 for each observation in the workfile sample.
If SVEC1 is an string vector,
vector v1 = @len(svec1)
returns a vector containing the length of each element of SVEC1.
Cross-references