Why is there no strtoi in stdlib.h?

后端 未结 6 2014
深忆病人
深忆病人 2020-11-27 16:34

I have grown accustomed to strtod and variants. I am wondering why there is no strtoi shipped with stdlib.h. Why is it that the integer is left out of this part

6条回答
  •  忘掉有多难
    2020-11-27 16:55

    The integer isn't left out of the party: there is strtol, which converts a string to a long, which is an integer type.

提交回复
热议问题