英文:
What does "itoa" stand for in strconv.Itoa?
问题
这可能听起来像一个愚蠢的问题...但是我找不到任何地方解释strconv.Itoa中的"a"代表什么。如果它是将整数转换为字符串,为什么函数不叫做Itos?
英文:
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?
答案1
得分: 41
整数转ASCII。它来自C语言/UNIX。更多信息请参见此线程:https://stackoverflow.com/questions/2909768/where-did-the-name-atoi-come-from
在C语言中,没有字符串的概念,你有以空字符结尾的字符数组。
感谢 @mvp!
英文:
integer to ASCII. It comes from the C language/UNIX. See this thread for more: https://stackoverflow.com/questions/2909768/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!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论