Reputation: 117
I want to replace tabs with equal number of spaces in a string which I am reading from a file. The no. of spaces may vary depending on the editor.How to determine the no of spaces and replace as per in SAS 9.3? Please help.
Upvotes: 1
Views: 1046
Reputation: 51611
If you are using SAS then the INFILE statement can expand the tabs for you.
data _null_;
infile 'withtabs.txt' expandtabs ;
file 'withspaces.txt' ;
input;
put _infile_;
run;
Upvotes: 8
Reputation: 7769
Not sure whether you can do this programatically (determining the current tab size setting), but you can do this via :
Upvotes: 3