Command Reference : String and Date Function Reference
String length.
Syntax: @length(str)
str: string
Return: integer
Returns integer values for the length of the string str.
The commands
string orig = "I did not do it"
@length("I did not do it")
return the value 15.
If ALPHA1 is an alpha series,
series s1 = @length(alpha1)
returns the length of the string values of ALPHA1 for each observation in the workfile sample.
If SVEC1 is an string vector,
vector v1 = @length(svec1)
returns a vector containing the length of each element of SVEC1.
See also @left, @right, and @mid.