- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ExampleCompare (0.06 sec)
-
src/bytes/example_test.go
b := []byte("abc") clone := bytes.Clone(b) fmt.Printf("%s\n", clone) clone[0] = 'd' fmt.Printf("%s\n", b) fmt.Printf("%s\n", clone) // Output: // abc // abc // dbc } func ExampleCompare() { // Interpret Compare's result by comparing it to zero. var a, b []byte if bytes.Compare(a, b) < 0 { // a less b } if bytes.Compare(a, b) <= 0 { // a less or equal b }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0)