Ruby で作った。
最初の3つがtrue で、後ろの2つがfalse

INT_MAX = "2147483647"

def within_int_limit? ( str ) # 範囲内か?
res = true

# 先頭から続く、0 を除去する
while str.start_with? "0" # 先頭の文字が、0 なら
str.slice! 0 # 先頭の文字を削除する
end

len = str.length # 桁数
if len <= 9 then res = true # 長さ、0 も含む
elsif 11 <= len then res = false
else # 10 桁
10.times do |idx| # 1文字ずつ比較する
if str[ idx ] > INT_MAX[ idx ]
res = false; break
elsif str[ idx ] < INT_MAX[ idx ]
res = true; break
else # 等しい場合は、ループが続く。res は、true
end
end
end
res
end

[ "00", "123456789", "002147483647", "2147483655", "12345678901" ].each {
|str| p within_int_limit? str }