Seems like you could use boost::starts_with here instead. Personally I think that'd be cleaner than using a C function on two C++ strings.