I have an array with string data in it at myArray[0]. The string is /user/Music/filename.txt what I need is to remove /user/Music/ from it and leave filename.txt in myArray[0]. I just need filename.txt and that's it.
Also this will be used a lot and can't use myArray[0].erase(0,12) because I will have /user/filename.txt as well.
I was thinking about finding the last / and after that should be the filename.txt but don't know how to code that in a loop or something.
1 2 3 4
MyArray[0].erase(0,12);
// works but sometimes the length I need removed is longer or shorter
// than 12.
Then I gave you the answer in my first post. Use std::string.find_last_of(). You can find excellent documentation for this function on the internet with just a little searching.