Splitting integer? or Substr() without wstring

Hi!

Is there a way to get the first number in a integer and then the second, and so on..?

like if i have an int=123. i want to export the '3', and use for something, and then the '2',. and so on..

i'm used to vb.net so i usually just substr the variables...
and i dont want to use the wstring lib if there is another solution.

The least significant of x is "x modulo 10" ("x % 10" in C)
The next digit is (x/10) % 10

In general, digit n (from the right, starting with 0) of x can be gotten with:

byte getdigit(long x, byte n)
{
  while (n > 0) {
    x = x / 10;
    n--;
  }
  return x % 10;
}

Thanks!