last 2 lectures of section 12

last 2 lectures of section 12
This commit is contained in:
2025-02-05 11:37:23 +01:00
parent 248388f5de
commit ec3676ddd4
2 changed files with 83 additions and 0 deletions

19
Section12/96.go Normal file
View File

@@ -0,0 +1,19 @@
package main
import (
"fmt"
)
func main() {
s1 := "I love Golang!"
fmt.Println(s1[2:5])
s2 := "我爱戈兰"
fmt.Println(s2[0:2])
rs := []rune(s2)
fmt.Printf("%T\n", rs)
fmt.Println(string(rs[0:3]))
}