make loop

This commit is contained in:
chai2010
2015-12-26 20:05:30 +08:00
parent 82ec0c025d
commit e15e88dad7
74 changed files with 207 additions and 207 deletions

View File

@@ -10,7 +10,7 @@ fmt.Println(len(s)) // "12"
fmt.Println(s[0], s[7]) // "104 119" ('h' and 'w')
```
如果視圖訪問超字符串范圍的字節將會導致panic異常:
如果視圖訪問超字符串范圍的字節將會導致panic異常:
```Go
c := s[len(s)] // panic: index out of range
@@ -24,7 +24,7 @@ c := s[len(s)] // panic: index out of range
fmt.Println(s[0:5]) // "hello"
```
同樣, 如果索引超字符串范圍或者j小於i的話將導致panic異常.
同樣, 如果索引超字符串范圍或者j小於i的話將導致panic異常.
不管i還是j都可能被忽略, 當它們被忽略時將采用0作爲開始位置, 采用 len(s) 作爲接受的位置.