Use log10 to determine buffer size for int->str