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?
- How to convert a string in uppercase in Golang?
- How to Map a Rune to the Specified Case in Golang?
- How to Map a Rune to Title Case in Golang?
- Golang | Deadlock and Default Case in Select Statement
- Checking Slice of bytes for equality under Unicode case folding in Golang
- How to convert a slice of bytes in lowercase in Golang?
- How to convert a slice of bytes in uppercase in Golang?
- How to Split a String in Golang?
- How to Trim a String in Golang?
- How to check the specified rune in Golang String?
- How to find the index value of specified string in Golang?
- How to Replace Characters in Golang String?
- How to find the last index value of specified string in Golang?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.