🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.language.objectpascal
Article #32531

Re: How to check if a string value contains a numeric character

#32531
From: Robert Priestley
Date: Fri, 22 Nov 2002 10:40
50 lines
2350 bytes
Hi,

Existing Delphi function StrToIntDef would also produce your desired result.

Rob.


"Martin Potokar" <gomfp@hotmail.com> wrote in message
news:3dde0232@newsgroups.borland.com...
> Thanks to Kumar, Jens (Quite a character you are. The Check is in the
> mail!), and Martin. I'm inclined to pick Martin's solution as my top
choice
> since my name is also Martin (just kidding but my name is in fact,
Martin).
> Thanks again for the replys, gentlemen. Why didn't I think of that?
>
> Marty Potokar
>
>
> "Martin James" <mjames_falcon@dial.pipex.com> wrote in message
> news:3dddff49@newsgroups.borland.com...
> >
> > Jens Geyer <jgx@vsx.net> wrote in message
> > news:3dddf0e7@newsgroups.borland.com...
> > >
> > > > Given a string with five characters, how can I determine through
> > code as
> > > to
> > > > whether or not the string contains all numeric characters? Thank
> > you ahead
> > > > of time.
> > > >
> > >
> > > Ok, let me do your homework.
> > >
> >
> > Or, even more impressive, use a set:
> >
> > if not myString[index] in ['0'..'9'] then....
> >
> > If my solution gets higher marks that others that use a const string,
> > please send me the fee instead.  Jens can go hungry.
> >
> > Rgds,
> > Martin :)
> >
> >
> >
>
>
Technical Details
Message-ID: <3dde0999$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail
References: <3ddddf95$1@newsgroups.borland.com> <3dddf0e7@newsgroups.borland.com> <3dddff49@newsgroups.borland.com> <3dde0232@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109d30,309aca370994f001
X-Google-Attributes: gid109d30,public
X-Google-ArrivalTime: 2002-11-22 03:15:35 PST
From: "Robert Priestley" <RPriestley@vectaplc.com>
Newsgroups: borland.public.delphi.language.objectpascal
References: <3ddddf95$1@newsgroups.borland.com> <3dddf0e7@newsgroups.borland.com> <3dddff49@newsgroups.borland.com> <3dde0232@newsgroups.borland.com>
Subject: Re: How to check if a string value contains a numeric character
Date: Fri, 22 Nov 2002 10:40:08 -0000
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: 62.232.8.3
Message-ID: <3dde0999$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1037961625 62.232.8.3 (22 Nov 2002 02:40:25 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail