Microsoft interview question

Simple string manipulation questions. Then about how I would test it.