![]() |
PING
0.9
Statistical data handling and processing in production environment
|
Trim a given formatted list from its duplicated elements and return the list of unique items.
clist : a list of formatted (e.g., comma-separated quote-enhanced) strings;casense : (option) boolean flag (yes/no) set to perform cases sensitive representation; default: casense=no, i.e. lower- and upper-case versions of the same strings are considered as equal;mark, sep : (option) characters/strings used respectively as a "quote" and a separator in the input list; default: mark=str(%"), and" sep=%quote(,), i.e. the input clist is a comma-separated list of quote-enhanced items; see %clist_unquote for further details.cluni : output formatted list of unique elements present in the input list clist; when the case unsentiveness is set (through casense=no), cluni is returned as a list of upper case elements.
returns: cluni=("A","B","b","c","C","D","E","e","F"), while:
returns: cluni=("A","B","C","D","E","F").
Run macro %_example_clist_unique for more examples.
The macro will not return exactly what you want if the symbol $ appears somewhere in the list. If you need to use $, you can reset the global macro variable G_PING_UNLIKELY_CHAR (see _setup_ file) to another dumb (unlikely) character of your own.
%list_unique, %list_slice, %clist_compare, %clist_append, %clist_unquote.