Truncate value to given size