$IFNDEF __INVCASE$_INC: $DEFINE __INVCASE$_INC
FUNCTION InvCase$(ByRef Str AS STRING) AS STRING
FOR i=1 TO LEN(Str)
IF MID$(Str, i, 1)=UCASE$(MID$(Str, i, 1)) THEN
Str=REPLACE$(Str, LCASE$(MID$(Str, i, 1)), i)
ELSE
Str=REPLACE$(Str, UCASE$(MID$(Str, i,1)), i)
END IF
NEXT i
Result=Str
END FUNCTION
$ENDIF
|