大小写转换函数

UCase Function

Returns a string that has been converted to uppercase.

UCase(string)

The string argument is any valid string expression. If string contains Null, Null is returned.

Remarks

Only lowercase letters are converted to uppercase; all uppercase letters and non-letter characters remain unchanged.

The following example uses the UCase function to return an uppercase version of a string:

Dim MyWord
MyWord = UCase("Hello World")   ' Returns "HELLO WORLD".
 
   
 
   

LCase Function

Returns a string that has been converted to lowercase.

LCase(string)

The string argument is any valid string expression. If string contains Null, Null is returned.

Remarks

Only uppercase letters are converted to lowercase; all lowercase letters and non-letter characters remain unchanged.

The following example uses the LCase function to convert uppercase letters to lowercase:

Dim MyString
Dim LCaseString
MyString = "VBSCript"
LCaseString = LCase(MyString)   ' LCaseString contains "vbscript".

你可能感兴趣的:(VC++)