Stripe interview question

String processing in multiple parts