[REBOL] Re: Testing if a string is an integer?
From: petr:krenzelok:trz:cz at: 9-Dec-2000 13:59
----- Original Message -----
From: Carl Read <[carl--cybercraft--co--nz]>
Sent: Saturday, December 09, 2000 12:44 PM
Subject: [REBOL] Re: Testing if a string is an integer?
> On 09-Dec-00, Gabriele Santilli wrote:
> > Hello Carl!
> > On 08-Dic-00, you wrote:
> >> All I can think of is forall-ing through the string and
> >> checking every character, but I'm sure there's a more simpler
> >> way in REBOL.
> > digit: charset "1234567890"
> > parse string [some digit]
> Ah - very nice. Must look into 'parse properly. Hmmm, why doesn't...
> ? some
> give us some info on 'some?
heh, you should study docs a little bit imo ;-) 'some is part of parse
'some - repeat untill "some digit" is matched
'any - repeat untill "no or more" digits are matched
thru - move "thru" matched string
to - move "to" matched string
'copy str to "something" - copy everything from current position to
, put result in 'str