In Go language, strings are different from other languages like Java, C++, Python, etc. It is a sequence of variable-width characters where each and every character is represented by one or more bytes using UTF-8 Encoding.
In Go string, you are allowed to convert a string in the lowercase using ToLower() function. This function returns a copy of the given string in which all the Unicode letters mapped into lower case. This function is defined under strings package, so you have to import strings package in your program to access this function.
func ToLower(str string) string
Here, str represents a string which you want to convert to lowercase.
Strings (before): String 1: WelcomE, GeeksforGeeks** String 2: $$This is the, tuTorial oF Golang## String 3: HELLO! GOLANG String 4: lowercase conversion Strings (after): Result 1: welcome, geeksforgeeks** Result 2: $$this is the, tutorial of golang## Result 3: hello! golang Result 4: lowercase conversion
- How to convert a slice of bytes in title case in Golang?
- How to check String for equality under Unicode case folding in Golang?
- Checking Slice of bytes for equality under Unicode case folding in Golang
- How to Map a Rune to Title Case in Golang?
- How to Map a Rune to the Specified Case in Golang?
- Golang | Deadlock and Default Case in Select Statement
- Golang Program to Show the Duplicate Case Error in Switch Statement
- Switch Case with Break in For Loop in Golang
- How to convert a string in uppercase in Golang?
- How to Convert a zero terminated byte array to string in Golang?
- How to Convert string to integer type in Golang?
- Different Ways to Convert the Boolean Type in String in Golang
- Different Ways to Convert an Integer Variable to String in Golang
- How to Convert string to float type in Golang?
- How to convert a slice of bytes in uppercase in Golang?
- How to convert a slice of bytes in lowercase in Golang?
- How to convert Int data type to Float in Golang?
- string.Contains Function in Golang with Examples
- Converting a string variable into Boolean, Integer or Float type in Golang
- Golang Program that uses String Switch
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.