You need to be clearer about what you want to do. There is a huge difference between a string and a String. The string is not a class and does not have a toInt() method.Frankly, you should not be using the String class at all. It has a major problem that is going to, sooner or later, bite you.
This looks like it's converting each ASCII character
atof (Convert string to double)
This method is used for arrays, not strings.