DRW interview question

Manipulate a given string to a fixed format