C++ utilities

When you write code, happens that you need to do some "standard" operation like trim a string, convert strings into number or viceversa, split a string and transform it into array, control a e-mail validity... and so on. When you need to do so, things that you have already done many times before for a lots of different project, you never find the "right routine".

Here I would like to gather in one single page some of the most used C++ chunk of code, that I found around the web and that I build by myself, that should be immediately picked up when needed. For the code I didn't write, I reference the web page where I found it (also if I changed it a bit, following my needs).


Trim a string: http://www.cplusplus.com/faq/sequences/strings/trim/


Split a string: http://www.infernodevelopment.com/perfect-c-string-explode-split