strings.ContainsRune() Function in Golang with Examples Last Updated : 12 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The Unicode, which is a superset of ASCII and contains all the characters present in the world's writing system, is the character set that's being followed right now. Each character in the Unicode system is uniquely identified by a Unicode code point, which is referred to as runes in Golang. To know more about runes please go through the article Runes in Golang strings.ContainsRune() Function in Golang is used to check the given string contains the specified rune or not in it. Syntax: func ContainsRune(s string, r rune) bool Here, str is the string and r is s rune. It returns a boolean value true if the character specified by the rune is present in the string, else false. Example 1: CPP // Golang program to illustrate the // strings.ContainsRune() Function package main import ( "fmt" "strings" ) func main() { // using the function fmt.Println(strings.ContainsRune("geeksforgeeks", 97)) } Output: false The above code returns false as the character specified by the rune, or Unicode code point, 97, which is 'a', is not present in the string that is passed, "geeksforgeeks". Example 2: CPP // Golang program to illustrate the // strings.ContainsRune() Function package main import ( "fmt" "strings" ) func main() { str := "geeksforgeeks" // using the function if strings.ContainsRune(str, 103) { fmt.Println("Yes") } else { fmt.Println("No") } } Output: Yes Comment More infoAdvertise with us Next Article strings.Contains Function in Golang with Examples S supergops Follow Improve Article Tags : Go Language Write From Home Golang-String Similar Reads strings.Contains Function in Golang with Examples strings.Contains Function in Golang is used to check the given letters present in the given string or not. If the letter is present in the given string, then it will return true, otherwise, return false. Syntax: func Contains(str, substr string) bool Here, str is the original string and substr is t 2 min read strings.ContainsAny() Function in Golang with Examples ContainsAny function is used to check whether any Unicode code points in chars are present in the string. It is an inbuilt function used to find if a specified string exists in the string if found it will return true or else false. Syntax: func ContainsAny(str, charstr string) bool Here, the first p 2 min read strings.Compare() Function in Golang with Examples The Compare() function is an inbuilt function in the Golang programming language which is used to compare two strings. It is used to compare two strings in lexicographical order (order in which the words are arranged alphabetically, similar to the way we search words in dictionary) or to find out if 2 min read strings.Join() Function in Golang With Examples strings.Join() Function in Golang concatenates all the elements present in the slice of string into a single string. This function is available in the string package. Syntax: func Join(s []string, sep string) string Here, s is the string from which we can concatenate elements and sep is the separato 1 min read strings.EqualFold() Function in Golang With Examples strings.EqualFold() Function in Golang reports whether s and t, interpreted as UTF-8 strings, are equal under Unicode case-folding, which is a more general form of case-insensitivity. Syntax: func EqualFold(s1, s2 string) bool Here, s1 and s2 are strings. Return Value: It returns the boolean value 1 min read strings.Map() Function in Golang With Examples strings.Map() Function in Golang is used to return a copy of the string given string with all its characters modified according to the mapping function. If mapping returns a negative value, the character is dropped from the string with no replacement. So whenever the user wants to make changes in a 2 min read Like