BlackRock Interview Question

Basic string manipulation question in any language