Microsoft interview question

Q: Given a String, replace certain elements in the string with emoticons.