Guidance
指路人
g.yi.org
software / rapidq / Examples / String & Text / invCase$.inc

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
' InvCase$ - A string function which converts each alpha character's case to its opposite
'
' Not really useful, but something different :)

     $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
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2019-4-23  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-09-28 16:27:00