Ler em inglês Editar

Partilhar via


Strings.LCase Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Returns a string or character converted to lowercase.

Overloads

LCase(Char)

Returns a string or character converted to lowercase.

LCase(String)

Returns a string or character converted to lowercase.

LCase(Char)

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

Returns a string or character converted to lowercase.

C#
public static char LCase(char Value);

Parameters

Value
Char

Required. Any valid String or Char expression.

Returns

A string or character converted to lowercase.

Examples

This example uses the LCase function to return a lowercase version of a string.

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

Remarks

Only uppercase letters are converted to lowercase; all lowercase letters and nonletter characters remain unchanged.

This function uses the application's culture information when manipulating the string so that the case changes are appropriate for the locale in which the application is being used.

Importante

If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the String.Compare method, and pass Ordinal or OrdinalIgnoreCase for the comparisonType argument. For more information, see How Culture Affects Strings in Visual Basic.

See also

Applies to

.NET 10 e outras versões
Produto Versões
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

LCase(String)

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

Returns a string or character converted to lowercase.

C#
public static string? LCase(string? Value);
C#
public static string LCase(string Value);

Parameters

Value
String

Required. Any valid String or Char expression.

Returns

A string or character converted to lowercase.

Examples

This example uses the LCase function to return a lowercase version of a string.

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

Remarks

Only uppercase letters are converted to lowercase; all lowercase letters and nonletter characters remain unchanged.

This function uses the application's culture information when manipulating the string so that the case changes are appropriate for the locale in which the application is being used.

Importante

If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the String.Compare method, and pass Ordinal or OrdinalIgnoreCase for the comparisonType argument. For more information, see How Culture Affects Strings in Visual Basic.

See also

Applies to

.NET 10 e outras versões
Produto Versões
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1