Add truncate & truncateFromCenter with test

This should be better right now :smile: 
Don't forget about this extra line break!