upperCase to lowerCase

andu undo at cloud9.net
Tue Jan 15 00:36:01 EST 2002


"Ken Norris (dialup)" wrote:
> 
> on 1/14/02 7:33 AM, Rolf Kocherhans at rolfk at vetvir.unizh.ch wrote:
> 
> > Can anyone help me to rewrite the function below so that it changes
> > upperCase to lowerCase.
> >
> >
> > This Function changes lowerCase to upperCase:
> >
> > function upperCase whatStr
> > repeat with charNum = 1 to the number of chars in whatStr
> > put charToNum(char charNum of whatStr) into thisChar
> > if thisChar >= 97 AND thisChar <= 122
> > then put numToChar(thisChar - 32) into char charNum of whatStr
> > end repeat
> > return whatStr
> > end upperCase
> ----------
> Maybe I don't understand the question, but its just reversed, starting with
> the upper case char numbers and add 32.
> 
> function upperCase whatStr
>    repeat with charNum = 1 to the number of chars in whatStr
>      put charToNum(char charNum of whatStr) into thisChar
>      if thisChar >= 65 AND thisChar <= 90
>      then put numToChar(thisChar + 32) into char charNum of whatStr
>    end repeat
>    return whatStr
> end upperCase

toUpper(string)
toLower(string)

> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution

-- 
__________________________
 Regards, Andu



More information about the use-livecode mailing list