strconv实现了go中基本数据类型与string之间的转换. How to use in go go doc:https://godoc.org/strconv import "strconv" int ↔ string func Atoi(s string) (int, error) 将string类型的s转换为十进制int类型,同时会返回error. func Itoa(i int) string 将十进制i转换为string类型. // int ↔ string string…
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases. Notes: It is intended for this problem to be spe…