Exercise solution:
String functions