33 lines
537 B
Plaintext
33 lines
537 B
Plaintext
|
// 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)
|
||
|
}
|