Strings methods

Report a typo

Suppose you have a string variable — source := "golang". Match the methods of the strings package with the correct method output.

Match the items from left and right columns
strings.HasPrefix(source, "go")
strings.HasSuffix(source, "go")
strings.Index(source, "g")
strings.Count(source, "")
false
true
7
0
___

Create a free account to access the full topic