Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_dedup.sas File Reference

de-duplicates a macro string More...

Go to the source code of this file.

Detailed Description

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
Parameters
[in]strString to be deduplicated
[in]indlm=( ) Delimeter of the input string
[out]outdlm=( ) Delimiter of the output string

Related Macros

Version
9.2
Author
Allan Bowe

Definition in file mf_dedup.sas.