Ok, so I’m trying to take an unsigned integer in a string, say “123897649999912” and round it to the nearest 10 * x like, say, x = 9, would give “123897650” and x = 8 would give “12389765”. The number of digits is equal to x, and I’m rounding to that nearest digit. I’m using Swift. How do I round to the nearest x digits?
17