开发者

Somebody know What is the name of this algorithm?

This is an algorithm for converting an string to an integer:

int n = 0;
for (i = 0; i < digits.lengt开发者_高级运维h; i++)
  n = n * 10 + (digits[i] - '0');

Somebody know what is the name of this algorithm? I need it for a reference in an article. I have used it but now I need some reference.


If you had to give a name to it, most likely it would be atoi (like the C function)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜