package main
import (
"fmt"
"strings"
)
func main() {
s1 := "kevin"
s2 := "kevin"
s3 := "anna"
s4 := "susan"
result1 := strings.Compare(s1, s2)
fmt.Println("result 1:", result1)
result2 := strings.Compare(s1, s3)
fmt.Println("result 2:", result2)
result3 := strings.Compare(s1, s4)
fmt.Println("result 3:", result3)
}
Output
result 1: 0
result 2: 1
result 3: -1