[REBOL] Re: can't quite get it right...
From: carl:cybercraft at: 31-Dec-2002 19:26
On 30-Dec-02, Andrew Martin wrote:
> Hallvard wrote:
>> could this be trimmed further?
> Yes. I think it would be best as a native that exposed the operating
> system's equivalent of 'Uppercase? (and 'Lowercase? as well) for
> maximum portability and speed.
Thinking about this, I was wondering if it'd make sense to add a
compare refinement (as with sort) to *all* and *any*. We could then
do the likes of this...
all/compare "ABC" func [v][all [char? v v >= ##"A" v <= ##"Z"]]
That'd check that all values in a series were uppercase, while the
following would check for any numbers in a block...
any/compare ["a" 1 "b" 2] func [v][number? v]
and so on. (*all* and *any* currently only work on blocks, but with
compare could be extended to series.)
Or is there a word in REBOL that already allows us to do this?
--
Carl Read