|
Title
[D] functions -- Functions
String function
strtoname(s,p)
Domain s: strings
Domain p: 0 or 1
Range: strings
Description: returns s translated into a Stata name. Each character in s that is not allowed in a Stata name is converted to an underscore character, _. If the first character
in s is a numeric character and p is not 0, then the result is prefixed with an underscore. The result is truncated to 32 characters.
strtoname("name",1) = "name"
strtoname("a name",1) = "a_name"
strtoname("5",1) = "_5"
strtoname("5:30",1) = "_5_30"
strtoname("5",0) = "5"
strtoname("5:30",0) = "5_30"
strtoname(s)
Domain s: strings
Range: strings
Description: returns s translated into a Stata name. Each character in s that is not allowed in a Stata name is converted to an underscore character, _. If the first character
in s is a numeric character, then the result is prefixed with an underscore. The result is truncated to 32 characters.
strtoname("name") = "name"
strtoname("a name") = "a_name"
strtoname("5") = "_5"
strtoname("5:30") = "_5_30"
|