Stripe Interview Question

Multi part string manipulation question