Add truncate & truncateFromCenter with test

This should be better right now :smile: 
Just return `beginningString + separator + endString`. No need for the extra `string` variable.