Download reverse.sas reverse.sasSubmit a comment

%macro reverse (string);
  %local i rstring;
  %let rstring=;
  %let string=%quote(&string);
  %do i=%length(&string) %to 1 %by -1;%quote(%substr(&string,&i,1))%end;
%mend;