Add truncate & truncateFromCenter with test

This should be better right now :smile: 
Let's test some additional edge cases. What happens if the length you want to truncate to is shorter than the ending? See the tests for `truncateFromCenter()` for a clue.