indexFromString

If str is an array index, returns it as a value in 0..2^32-1. Otherwise returns -1. Leading zeroes and "-0" are not indexes.