Toggle navigation
淦 Blog
Home
About
Archive
Portfolio
淦 Blog
我干了什么 究竟拿了时间换了什么
Golang字符串本质与实现
字符串本质 在Go语言中,字符串不能被修改,只能被访问,不能采取如下方式对字符串进行修改。 1 2 var b = "hello world" b[1] = '0' Go语言运行时字符串string的表示结构如下。 1 2 3 4 type StringHeader struct { Data uintptr Len int } 其中,Data指向底层的字符数组,Len 代表字符串...
Posted by 淦 Blog on January 1, 2023
← Newer Posts
ABOUT ME
Something for nothing.
用什么珍贵的东西,换来了空白。