Add truncate & truncateFromCenter with test

This should be better right now :smile: 
Let's use double quotes (") everywhere.