I'm not sure I understand what you want.
The numeric values you're using as examples are represented by objects in memory known as integers. Integers are storage units whose value is stored as a binary value, not the decimal value stored as Arabic numerals.
Integer objects don't have a length that corresponds to the number of decimal digits in, say, the value 365. You can, however, get the string representation of that binary value. That string will contain the decimal value of the integer.
If what you want is a string that's one character long when the integers' value is 0 to 9, and a two character string when the integers' value is 10 to 99, and a three character string when the integers' value is from 100 to 999 then all you need to do is ask to have the integer value transformed into a string value.
Here's an example:
for ($i=1;$i -le 120; $i+=10){
"`$i = $i : `$i Length $($i.length)"
$n = $i.ToString()
"`$n = $n : `$n Length $($n.Length)"
}
Run that and you'll get an output that looks like this:
$i = 1 : $i Length 1
$n = 1 : $n Length 1
$i = 11 : $i Length 1
$n = 11 : $n Length 2
$i = 21 : $i Length 1
$n = 21 : $n Length 2
$i = 31 : $i Length 1
$n = 31 : $n Length 2
$i = 41 : $i Length 1
$n = 41 : $n Length 2
$i = 51 : $i Length 1
$n = 51 : $n Length 2
$i = 61 : $i Length 1
$n = 61 : $n Length 2
$i = 71 : $i Length 1
$n = 71 : $n Length 2
$i = 81 : $i Length 1
$n = 81 : $n Length 2
$i = 91 : $i Length 1
$n = 91 : $n Length 2
$i = 101 : $i Length 1
$n = 101 : $n Length 3
$i = 111 : $i Length 1
$n = 111 : $n Length 3