String to int

Hi everybody,

I need some help for my school project again.

I want to convert a String to an int, is it possible to do this ?

Thanks for your help ;)

If you insist on using String:
https://www.arduino.cc/reference/en/language/variables/data-types/string/functions/toint/

Much better would be to use a string (null terminated char array) and atoi or strtol:

Hi, Did you google arduino string to int

Tom.... :)

pert: If you insist on using String: https://www.arduino.cc/reference/en/language/variables/data-types/string/functions/toint/

Much better would be to use a string (null terminated char array) and atoi or strtol:

Thank you for your help ! it work very well

TomGeorge: Hi, Did you google arduino string to int

Tom.... :)

Yes I did but i don't find something usefull... :)

Gweno: Yes I did but i don't find something usefull... :)

When in doubt, RTFM