Skip to content

Optimize ChompBytes() function

Mikhail Mazurskiy requested to merge ash2k/optimize-chomp into master

No need to allocate an intermediate string. Trim suffix first, then turn the result into a string. This function is used in quite a few places, so a quick optimization wouldn't hurt.

Merge request reports