Hello everybody, I'm just getting started and I need some help dealing with strings in CMake. Basically what I have a bunch of strings such as the ones below:
"Main.cpp" "Window/Example/Example.cpp" "Window/Window.cpp" What I need to do is create two strings for each, one is going to be the directory, so the output in order for the list above is: "" "Window/Example" "Window" And the other string I need is the file itself. So the output for that would be "Main.cpp" "Example.cpp" "Window.cpp" Since I'm processing each one by one it doesn't matter if there are collisions. As you can see all I need to is find the first forward slash on the string reading from right to left, and then put what's on the left of that string on one variable, and what is to the right in another. Does anybody know how I can do that? Thanks, Pablo Zurita. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake