Hello, I need your lights... For my development I need a function which converts a string to an integer, example this string "1234" gives this integer 1234. I was inspired by the function of the C language, atoi (alpha to integer). But the string processing functionalities are different from GML. I made several unsuccessful attempts. I attach the code of atoi (simplified) for inspiration ... Thank you in advance.
Code:
int atoi(char s[])
{
int i, n;
n = 0;
for(i = 0; s[i] >= '0' && s[i] <= '9'; ++i)
{
n = 10 * n + (s[i] - '0');
}
return(n);
}