This PR reduces the allocations when using string patterns. In particular `startsWith`, `dropPrefix?`, `endsWith`, `dropSuffix?` are optimized.