C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
ToLower: With ToLower, we have the same effect as the string ToLower method—uppercase chars are converted to lowercase ones.
ToUpper: With ToUpper, we convert all lowercase chars to uppercase. Nothing else happens to the string.
ToTitleCase: This function converts each lowercase letter that follows a space to an uppercase letter.
VB.NET program that uses TextInfo
Imports System.Globalization
Module Module1
Sub Main()
' Get instance of TextInfo.
Dim info1 As TextInfo = CultureInfo.InvariantCulture.TextInfo
' Convert string to lowercase with TextInfo.
Dim result1 As String = info1.ToLower("BIRD")
Console.WriteLine("TOLOWER: " + result1)
' Convert to uppercase.
Dim result2 As String = info1.ToUpper("bird")
Console.WriteLine("TO UPPER: " + result2)
' Convert to title case.
Dim result3 As String = info1.ToTitleCase("blue bird")
Console.WriteLine("TO TITLE CASE: " + result3)
End Sub
End Module
Output
TOLOWER: bird
TO UPPER: BIRD
TO TITLE CASE: Blue Bird