Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
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;

SAS Macros

Parameters
[in]basestrThe string to be modified
[in]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.