On Saturday 10 January 2009, Robert Dailey wrote: > Hi, > > Suppose I have a string called "foobar". I want to be able to strip a > specific prefix from that string and have the suffix returned to me. So if > I wanted to strip "foo", I would get "bar" back. What's the easiest way of > doing this in CMake?
You could do e.g. if ("${YOUR_STRING}" MATCHES "^(foo)(.+)$") set(YOUR_SUFFIX "${CMAKE_MATCH_2}") endif ("${YOUR_STRING}" MATCHES "^(foo)(.+)$") Alex _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake