Reputation: 21
Using Embarcadero C++ Builder 10.4
I appreciate this question has been asked 100's of times and I have sifted through many of them. I was looking for a Unicode method, thus not needing to convert to char const (i.e. _splitpath) Many examples refer to using boost::filesystem, however I can't compile my (20yr old, 60+ forms and units) app to C++ 17, without spending too much time making it compliant.
I am hoping for something as simple as the Deplhi method, "ExtractFileName"
Upvotes: 0
Views: 527
Reputation: 595349
Delphi's RTL (and VCL and FMX frameworks) is also available in C++Builder. You can literally use the same ExtractFileName()
function in your C++ code. Simply add #include <System.SysUtils.hpp>
to use it.
This is even pointed out in Embarcadero's documentation:
https://docwiki.embarcadero.com/Libraries/en/System.SysUtils.ExtractFileName
Upvotes: 1