Add truncate & truncateFromCenter with test

This should be better right now :smile: 
I don't think it's necessary to throw an error if the argument isn't supplied. People should know how to call the methods correctly. Please remove this part.