You don't see strings with commas between them, but it has the same kind of property. It is in ordered sequence of characters.
它是有序的字符序列,我们可以对字符串做同样的操作,我们也可以得到字符串中的一块。
And so what's the loop going to do?
字符的序列来对待了?
I'm going to delete that arrow and actually draw s2 as pointing to this chunk of memory because whereas before this sequence of chars might have lived at address 71 or whatever, well, this one might live at 91.
我不会把那个箭头删除,实际上我画了s2作为,这块内存的指针,因为,这个字符序列存储在地址71或其它的地方,这个可能存储在91的地方。
But I can also ask for parts of this. So I can, for example, say give me the first element of s1 string 1, s 1. Ah, that's exactly what we would have thought if this was represented as an ordered sequence of things.
然后返回一个长字符串,我也可以,取字符串的一部分,例如,我可以要求返回给我字符串,的第一个元素,啊,这证明我们之前,认为的它是一个有序的字符序列的想法。
应用推荐