I just wrote about how to trim strings with boost. The code where I first needed to trim a string, was actually very simple naive parser where strings of key value pairs would be split, and then each part trimmed to ensure that both key and value was without leading