Strings question 2

added function for question #2 in strings section. And it works!