Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mf_trimstr.sas File Reference

Removes character(s) from the end, if they exist. More...

Go to the source code of this file.

Detailed Description

If the designated characters exist at the end of the string, they are removed

  %put %mf_trimstr(/blah/,/); * /blah;
  %put %mf_trimstr(/blah/,h); * /blah/;
  %put %mf_trimstr(/blah/,h/);* /bla;

Dependencies

Parameters
basestrThe string to be modified
trimstrThe string to be removed from the end of basestr, if it exists
Returns
output returns result with the value of trimstr removed from the end
Version
9.2
Author
Allan Bowe

Definition in file mf_trimstr.sas.