Nearform interview question

String manipulation coding question. Know your strings, loops, splits and joins.