LCase() 函数用于将指定的字符串转换为小写。
用法:
LCase(Str)
参数:
- Str:指定要转换为小写的字符串。
返回值:
LCase() 函数将返回小写字符串。
程序/源代码:
下面给出了演示 LCase() 函数的源代码。给定的程序已成功编译并执行。
'VB.Net program to demonstrate the LCase() function.
Module Module1
Sub Main()
Dim str As String = "I Love India"
Dim LCaseStr As String
LCaseStr = LCase(str)
Console.WriteLine("Lowercase string:{0}", LCaseStr)
End Sub
End Module
输出:
Lowercase string:i love india Press any key to continue . . .
说明:
在上面的程序中,我们创建了一个包含 Main() 方法的模块 Module1。在Main()方法中,我们创建了两个变量str和LCaseStr,这里变量str初始化为“I Love India”,变量LCaseStr初始化为空字符串。
LCaseStr = LCase(str)
在上面的代码中,我们使用了将返回小写字符串的 LCase() 函数。然后我们在控制台屏幕上打印字符串。
相关用法
- VB.NET LTrim()用法及代码示例
- VB.NET DateTime FromBinary()用法及代码示例
- VB.NET CLng()用法及代码示例
- VB.NET RTrim()用法及代码示例
- VB.NET GetChar()用法及代码示例
- VB.NET Array Reverse()用法及代码示例
- VB.NET DateTime ToBinary()用法及代码示例
- VB.NET Array Resize()用法及代码示例
- VB.NET CInt()用法及代码示例
- VB.NET CULng()用法及代码示例
- VB.NET CDbl()用法及代码示例
- VB.NET Array ConstrainedCopy()用法及代码示例
- VB.NET Array Clear()用法及代码示例
- VB.NET Array LastIndexOf()用法及代码示例
- VB.NET String Join()用法及代码示例
- VB.NET String IsNullorWhitSpace()用法及代码示例
- VB.NET InStr()用法及代码示例
- VB.NET Array BinarySearch()用法及代码示例
- VB.NET CByte()用法及代码示例
- VB.NET CBool()用法及代码示例
注:本文由纯净天空筛选整理自 VB.Net program to demonstrate the LCase() function。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。