Strings.LCase 方法

定义

返回转换为小写的字符串或字符。

重载

名称 说明
LCase(Char)

返回转换为小写的字符串或字符。

LCase(String)

返回转换为小写的字符串或字符。

LCase(Char)

Source:
Strings.vb
Source:
Strings.vb
Source:
Strings.vb
Source:
Strings.vb
Source:
Strings.vb

返回转换为小写的字符串或字符。

public:
 static char LCase(char Value);
public static char LCase(char Value);
static member LCase : char -> char
Public Function LCase (Value As Char) As Char

参数

Value
Char

必填。 任何有效 StringChar 表达式。

返回

转换为小写的字符串或字符。

示例

此示例使用 LCase 函数返回字符串的小写版本。

' String to convert.
Dim upperCase As String = "Hello World 1234"
' Returns "hello world 1234".
Dim lowerCase As String = LCase(upperCase)

注解

只将大写字母转换为小写字母;所有小写字母和非分行字符保持不变。

此函数在操作字符串时使用应用程序的区域性信息,以便大小写更改适用于正在使用应用程序的区域设置。

Important

如果您的应用程序根据比较或大小写转换操作的结果做出安全决策,则该操作应使用 String.Compare 方法,并将 OrdinalOrdinalIgnoreCase 传递给 comparisonType 参数。 有关详细信息,请参阅 区域性如何影响 Visual Basic 中的字符串。

另请参阅

适用于

LCase(String)

Source:
Strings.vb
Source:
Strings.vb
Source:
Strings.vb
Source:
Strings.vb
Source:
Strings.vb

返回转换为小写的字符串或字符。

public:
 static System::String ^ LCase(System::String ^ Value);
public static string? LCase(string? Value);
public static string LCase(string Value);
static member LCase : string -> string
Public Function LCase (Value As String) As String

参数

Value
String

必填。 任何有效 StringChar 表达式。

返回

转换为小写的字符串或字符。

示例

此示例使用 LCase 函数返回字符串的小写版本。

' String to convert.
Dim upperCase As String = "Hello World 1234"
' Returns "hello world 1234".
Dim lowerCase As String = LCase(upperCase)

注解

只将大写字母转换为小写字母;所有小写字母和非分行字符保持不变。

此函数在操作字符串时使用应用程序的区域性信息,以便大小写更改适用于正在使用应用程序的区域设置。

Important

如果您的应用程序根据比较或大小写转换操作的结果做出安全决策,则该操作应使用 String.Compare 方法,并将 OrdinalOrdinalIgnoreCase 传递给 comparisonType 参数。 有关详细信息,请参阅 区域性如何影响 Visual Basic 中的字符串。

另请参阅

适用于