Strings.UCase 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 containing the specified string converted to uppercase.
Overloads
UCase(Char) |
Returns a string or character containing the specified string converted to uppercase. |
UCase(String) |
Returns a string or character containing the specified string converted to uppercase. |
UCase(Char)
- Source:
- Strings.vb
- Source:
- Strings.vb
- Source:
- Strings.vb
Returns a string or character containing the specified string converted to uppercase.
public:
static char UCase(char Value);
public static char UCase (char Value);
static member UCase : char -> char
Public Function UCase (Value As Char) As Char
Parameters
- Value
- Char
Required. Any valid String
or Char
expression.
Returns
A string or character containing the specified string converted to uppercase.
Examples
This example uses the UCase
function to return an uppercase version of a string.
' String to convert.
Dim lowerCase As String = "Hello World 1234"
' Returns "HELLO WORLD 1234".
Dim upperCase As String = UCase(lowerCase)
Remarks
Only lowercase letters are converted to uppercase; all uppercase 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.
Important
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
UCase(String)
- Source:
- Strings.vb
- Source:
- Strings.vb
- Source:
- Strings.vb
Returns a string or character containing the specified string converted to uppercase.
public:
static System::String ^ UCase(System::String ^ Value);
public static string UCase (string? Value);
public static string UCase (string Value);
static member UCase : string -> string
Public Function UCase (Value As String) As String
Parameters
- Value
- String
Required. Any valid String
or Char
expression.
Returns
A string or character containing the specified string converted to uppercase.
Examples
This example uses the UCase
function to return an uppercase version of a string.
' String to convert.
Dim lowerCase As String = "Hello World 1234"
' Returns "HELLO WORLD 1234".
Dim upperCase As String = UCase(lowerCase)
Remarks
Only lowercase letters are converted to uppercase; all uppercase 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.
Important
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.