Add truncate & truncateFromCenter method with test

This should be better right now :smile: