Answers for "golang if statement with string"

Go
0

golang if statement with string

import "strings"

// if string found in name it returns 0 else 1
if strings.Compare(name, "compare string") == 1 {
	// Do something
}
Posted by: Guest on March-03-2020

Code answers related to "golang if statement with string"

Browse Popular Code Answers by Language