We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
切片2线条应该从第三项开始,且cap=8
The text was updated successfully, but these errors were encountered:
切片s2是基于切片s1进行的slicing,确认了一下,图中没错。下面是确认的代码:
package main import "fmt" func main() { u := [10]byte{11, 12, 13, 14, 15, 16, 17, 18, 19, 20} s1 := u[1:5] s2 := s1[2:4] fmt.Println(s1, cap(s1)) // [12 13 14 15] 9 fmt.Println(s2, cap(s2)) // [14 15] 7 }
Sorry, something went wrong.
No branches or pull requests
切片2线条应该从第三项开始,且cap=8
The text was updated successfully, but these errors were encountered: