Пример #1
0
func ExampleSort() {
	slice := []string{"Aardvark", "hello", "aardvark", "  Hello", "World!"}
	normalizedsort.Sort(slice, nil)
	fmt.Printf("%q\n", slice)
	// Output: ["  Hello" "Aardvark" "aardvark" "hello" "World!"]
}
Пример #2
0
func ExampleCaseInsensitiveTrimSpace() {
	slice := []string{"Aardvark", "hello", "aardvark", "  Hello", "World!"}
	normalizedsort.Sort(slice, normalizedsort.CaseInsensitiveTrimSpace)
	fmt.Printf("%q\n", slice)
	// Output: ["Aardvark" "aardvark" "  Hello" "hello" "World!"]
}