Search code examples
goitoa

What does "itoa" stand for in strconv.Itoa?


This might sound like a silly question... But I can't find anywhere what the "a" in strconv.Itoa actually stands for. If its taking an integer and turning it into a string, why isn't the function called Itos?


Solution

  • integer to ASCII. It comes from the C language/UNIX. See this thread for more: Where did the name `atoi` come from?

    In the C language, there is no concept such as strings, you have arrays of characters that are null terminated.

    Thanks to @mvp!