String to int conversion

Hello , I have read lots of topics regarding string conversions but all are complicated .

Can you suggest some single way to convert a string "1234" to int 1234 ?

Or any way to convert a string variable to a number variable.

Thank you

atoi() assuming you have a string.

.toInt() assuming you have a String.

Thank you it works Used like : integer1=string1.toInt();