Stripe interview question

Build a string parser in java