I would like to request an option added to $strip(), or a new identifier $trimcodes(), that reduces control codes to the essentials necessary for identical rendering without redundancies.

For examples:

This is ^K02^K04red^K text. -> This is ^K04red^K text.
This is ^B^B^Bbold^B^B^B te^U^Uxt. -> This is ^Bbold^B text.


This request is based on the assumption that something like this may already exist internally and hopefully would not require too much effort to expose to scripting.

--

P.S.es
The help file does not mention 'i' for Italic support in /help $strip().
Also, $strip() does strip ^O when no parameters are given, but can not strip ^O if any parameters are given.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!