This challenge is to take an alphabetical string as input and to apply the following conversion:
The first of each type of character of the string must stay, and must be immediately followed by an integer representing how many of these characters were in the original string. Any repeating characters must be omitted.
All inputs will be entirely lower-case letters (no spaces). Outputs must be ordered in the same way as the inputs (input
hi must give output of
This is code-golf. Shortest answer wins!