14 #include <boost/regex.hpp> 28 static boost::regex
const reVarName(
"(\\$\\.)|(\\(\\))");
30 return boost::regex_replace(iExpression, reVarName,
variable);
36 if (iNewFormat.substr(0, iNewFormatIndex) == iOldFormat.substr(0, iNewFormatIndex)) {
37 return iNewFormatIndex;
39 assert(iNewFormat.size() < iOldFormat.size());
40 std::string::const_iterator itNew = iNewFormat.begin(), itOld = iOldFormat.begin(), itNewEnd = iNewFormat.end();
41 for (; itNew != itNewEnd && itNew - iNewFormat.begin() < iNewFormatIndex; ++itNew, ++itOld) {
42 while (*itNew != *itOld) {
43 assert(itOld != iOldFormat.end());
47 return itOld - iOldFormat.begin();
long indexFromNewFormatToOldFormat(const std::string &iNewFormat, long iNewFormatIndex, const std::string &iOldFormat)
std::string oldToNewFormat(const std::string &iExpression)