Microsoft Interview Question

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