simply *and* harden str_to_int

Less code to boot :)