Description: Example 1-
Input string = 'abc,abc,abc,dcf,dcf,ef'.
output string ='3abc,2dcf,1ef'
Input string = 'xyzr,abdc,abdc,haha,haha'.
output string ='1xyzr,2abdc,2haha'
This function collapses a comma separated long string, containing sub-strings, into a possibly smaller string by replacing repeated sub-strings by counts of repetitions of substrings.
Related: possibly, substrings, separated, smaller, Replacing, repetitions, counts, repeated, comma, collapses, abcabcabcdcfdcfef output, String, Input, abc dcf, Function, xyzr abdc haha explanationthis, xyzrabdcabdchahahaha output
O/S:BSD, Linux, Solaris, Mac OS X
File Size: 10.0 KB