是string
在 Go 中就像一个 char*
在 C(或 char[]
)或类 string
中在 C++ 中...或其他什么?
我不明白字符串如何成为原始类型。
go 中的字符串表示为 by this structure在 C
struct String
{
byte* str;
intgo len;
};
str
指针指向实际的字符串数据,但这不是空终止的——长度保存在 len
中。成员。关于go - Go中的字符串是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16852218/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |