Article View: borland.public.cppbuilder.nativeapi
Article #4955Re: removing file extension
From: Vladimir Stefanovic
Date: Thu, 13 Oct 2005 19:08
Date: Thu, 13 Oct 2005 19:08
24 lines
1513 bytes
1513 bytes
> Have a look at ChangeFileExt().
Heh :)
I made 'my' own routine for that long time ago,
and I never thought that I could accomplish that
easier with ChangeFileExt(), although I use it
every day...
AnsiString ExtractFileNameWithoutExtension( AnsiString FILE )
{
/* MY OLD CODE
AnsiString FNM = ExtractFileName( FILE );
AnsiString EXT = ExtractFileExt ( FNM );
FNM.SetLength( FNM.Length() - EXT.Length() );
return ( FNM );
*/
return ( ExtractFileName ( ChangeFileExt( FILE, "" ) ) );
}
--
Best regards,
Vladimir Stefanovic
Technical Details
Message-ID:
<434eb000@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<434e9f72@newsgroups.borland.com> <434ea042$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ad1068ee1c4d7fab X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Newsgroups: borland.public.cppbuilder.nativeapi References: <434e9f72@newsgroups.borland.com> <434ea042$1@newsgroups.borland.com> Subject: Re: removing file extension Date: Thu, 13 Oct 2005 21:08:09 +0200 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 213.137.116.200 Message-ID: <434eb000@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1129230336 213.137.116.200 (13 Oct 2005 12:05:36 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail