Strings
package main
import (
"fmt"
)
func main() {
text := "Hello World!"
fmt.Println(text)
fmt.Println(text[1])
fmt.Printf("%c\n", text[1])
}
Hello World!
101
e
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
package main
import (
"fmt"
)
func main() {
text := "Hello World!"
fmt.Println(text)
fmt.Println(text[1])
fmt.Printf("%c\n", text[1])
}
Hello World!
101
e