#kotlinDevChallenge – 13

Implement a string compressor Write a function that takes a string and returns a compressed version, where consecutive duplicate characters are replaced with a single character followed by the number of repetitions. For example, “aabccc” becomes “a2bc3”.