Parsing Integer to String C

前端 未结 9 954
情深已故
情深已故 2020-12-14 08:58

How does one parse an integer to string(char* || char[]) in C? Is there an equivalent to the Integer.parseInt(String) method from Java in C?

9条回答
  •  囚心锁ツ
    2020-12-14 09:16

    The Java parseInt() function parses a string to return an integer. An equivalent C function is atoi(). However, this doesn't seem to match the first part of your question. Do you want to convert from an integer to a string, or from a string to an integer?

提交回复
热议问题