I'm using the ExtractFileExt function which includes the (.) so it should work
fine. I'm using a '?' (rather than @ or ..) which is illegal in filenames.
Thanks all.
Ross.
Stephen Bertram wrote:
> I assumed (kicks himself) that Ross had included the separator (.) in the
> Extension as he used '.wav' in his original post.
>
> For readability and to cover the case where the separator is not Extension I
> would probably use :
>
> Const AudioFiles = '..wav..mp3..ogg..';
> IsAudio := pos('.' + Extension + '.',AudioFiles) > 0);
>
> Stephen
>
> -----Original Message-----
> From: Roser, Wayne [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 2 August 2001 10:34 a.m.
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Sets of Strings? - Correction
>
> There are lots of good ideas on this thread but if you use this one, notice
> that an Extension of 'v' will give a true result.
> Wayne
>
> > -----Original Message-----
> > From: Ross Levis [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, 2 August 2001 10:31
> > To: Multiple recipients of list delphi
> > Subject: Re: [DUG]: Sets of Strings? - Correction
> >
> >
> > Stephen Bertram wrote:
> >
> > > IsAudio := (pos(Extension + '@', '.wav@.mp3@.ogg@') > 0);
> >
> > That's an idea.
> >
> > Const AudioFiles = '.wav@.mp3@.ogg@';
> > IsAudio := pos(Extension + '@',AudioFiles) > 0);
> >
> > It then allows me to easily add more formats in the future.
> > Though I'll
> > probably use a character that is illegal in a filename.
> >
> > Cheers,
> > Ross.
> >
> > --------------------------------------------------------------
> > -------------
> > New Zealand Delphi Users group - Delphi List -
> > [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> >
> ---------------------------------------------------------------------------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> ---------------------------------------------------------------------------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/