clear input str10 var1 A B C D E F end cap:ssc install sencode save cishi1,replace encode var1,generate (var2) tostring var2,replace gen var4=tobytes(var1) gen var6=substr(tobytes(var1),3,.) gen var8=char(real(substr(tobytes(var1),3,.))-16)
标签:123456,var1,replace,substr,STATA,tobytes,ABCDEF,gen From: https://www.cnblogs.com/xkdn/p/17398429.html