Mumbling Challenge

Published by Werdna in

Create a function that takes a string $str and modifies the given string as per the below examples:

Examples

mumbling("MubAshIr") ➞ "M-Uu-Bbb-Aaaa-Sssss-Hhhhhh-Iiiiiii-Rrrrrrrr"

mumbling("maTT") ➞ "M-Aa-Ttt-Tttt"

mumbling("EdaBit") ➞ "E-Dd-Aaa-Bbbb-Iiiii-Tttttt"

Notes

N/A

Watch a quick demo on how Edabit works.