Implement four string-processing functions | Upstart Coding Question