So I guess it's not converting but I took a look at the doc and the only reason why it would not work was that it's that the string should start by a numeral number.
int stringTOint(String wert)
{
char carray[wert.length() + 1]; //determine size of the array
wert.toCharArray(carray, sizeof(carray)); //put Stringinto an array
int erg = atoi(carray); //convert the array into an Integer
return erg;
}