Avoiding allocations at all costs.
While browsing Apache Arrow project, I have noticed the usage of a string replacement function:
let re_pattern = pat.replace("%", ".*").replace("_", ".");
and started to wonder what happens when pat contains neither % nor _. I expected replace funct...
softwarebits.hashnode.dev2 min read