This PR is where the caseSensitive flag was added to the Stringable replace function. If you want the exact implementation details and discussion, this is the link I’d check first before using it in production code.
You'll be taken to Github to complete your purchase.