MATLAB has a nice function called file parts, which takes the full path to the file and analyzes it for the path, file name (without extension) and extension, as in the following example from the documentation:
file = 'H:\user4\matlab\classpath.txt';
[pathstr, name, ext] = fileparts(file)
>> pathstr = H:\user4\matlab
>> name = classpath
>> ext = .txt
So, I was wondering if there is an equivalent function in any standard C ++ or C libraries that I could use? Or should I implement this myself? I understand this quite simply, but I wondered if there was something prepared in advance that would be preferable.
Thank.
SSilk source
share