|
Macros for SAS Application Developers
https://github.com/sasjs/core |
de-duplicates a macro string More...
Go to the source code of this file.
Removes all duplicates from a string of words. A delimeter can be chosen. Is inspired heavily by this excellent macro from Scott Base. Case sensitive.
Usage:
%let str=One two one two and through and through; %put %mf_dedup(&str); %put %mf_dedup(&str,outdlm=%str(,));
Which returns:
> One two one and through > One,two,one,and,through
| [in] | str | String to be deduplicated |
| [in] | indlm= | ( ) Delimeter of the input string |
| [out] | outdlm= | ( ) Delimiter of the output string |
Definition in file mf_dedup.sas.