First of all, it is very simple to convert a string to an int
Converting float to int will discard the content after the decimal point
boolean converted to int true is 1 false is 0
Then convert the string to an int. Be careful not to have special characters, such as 1.23, if there is a bit, an error will be reported.
The above string is 12ab, and if there is ab, an error will also be reported
look up