strip leading blanks/ left justify?
Posted: December 6th, 2015, 5:31 am
Is there a function that strips off leading blanks? (i.e., left justifies a string variable). the alphabetic list of statements claims that "strip" will strip off leading and trailing blanks, but the function definition itself says just trailing blanks (& that is correct).
I am importing a lookup file from stata's "outfile" command. [stata, alas, seems to write out an ANSI data file that CSPro cannot convert correctly, so in an editor (vi) I preface it with an ISO character(?) taken from one of my CSPro data files, and that seems to make it readable by CSPro]. But stata usually right justifies its output string variables and I can't strip off the leading blanks in CSPro. And when I force stata to left justify the output, it still has two leading blanks in all the string fields.
And I thought this was going to be easier than going through Excel...
I am importing a lookup file from stata's "outfile" command. [stata, alas, seems to write out an ANSI data file that CSPro cannot convert correctly, so in an editor (vi) I preface it with an ISO character(?) taken from one of my CSPro data files, and that seems to make it readable by CSPro]. But stata usually right justifies its output string variables and I can't strip off the leading blanks in CSPro. And when I force stata to left justify the output, it still has two leading blanks in all the string fields.
And I thought this was going to be easier than going through Excel...