SWAPCASE()

SWAPCASE()

Top  Previous  Next

 

The SWAPCASE() function inverts the case of all alphabetic characters in a string.

 

 

Format

 

SWAPCASE(string)

 

where

 

stringevaluates to the string in which substitution is to occur.

 

 

The SWAPCASE() function returns the value of string with all uppercase letters converted to lower case and all lowercase letters converted to uppercase. If string is a variable rather than an expression, the value of the variable is not affected.

 

 

Example

 

S = "ABCdef"

PRINT SWAPCASE(S)

 

This program fragment prints the string "abcDEF".

 

 

See also:

DOWNCASE(), UPCASE()