go-examples/go-hello/old

33 lines
537 B
Plaintext
Raw Normal View History

2017-07-07 12:29:36 +00:00
// doc package
package main
import (
"fmt"
"strconv"
"strings"
)
const unicode = "songe d'une nuit d'été"
func main() {
fmt.Println(strings.ToTitle(unicode))
fmt.Println(strings.ToUpper(unicode))
fmt.Println(strings.Replace(unicode, "été", "hiver", -1))
test := ""
//test := "0777"
fmt.Println(strconv.ParseInt(test, 8, 0))
fmt.Println(strconv.Quote(unicode))
sl := []int{1, 2, 3}
sl2 := append(sl, 4, 5)
sl[0] = 9
fmt.Println(sl)
fmt.Println(sl2)
sl3 := make([]int, 2)
copy(sl3, sl2[2:])
fmt.Println(sl3)
}