Added truncate methods. Implements #80

If you have any suggestions on how the API should look like, please let me know!