Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: can't quite get it right...

From: greggirwin:mindspring at: 29-Dec-2002 15:28

Hi Hallvard, HY> uppercase?: func [ ch [char! string!] ] [ HY> either char? ch [ HY> return all [(ch >= #"A") (ch <= #"Z")] HY> ] [ HY> foreach ar ch [if not all [(ar >= #"A") (ar <= #"Z")] [return false]] HY> ] HY> true HY> ] HY> ...could this be trimmed further? For the string comparison, you could do this: either ch == uppercase copy ch [true][false] -- Gregg