For example I have the string "root/data/home/file1.txt" I would like to get "root/data/home" Is there a convenient function in C++ that allows me to do this or should I code it myself?
For example I have the string root/data/home/file1.txt I would like to get root/data/home Is
Share
You can do basic string manipulation, i.e.
or take a third option like Boost.Filesystem: