49 unsigned int pos = input.find(
m_left);
50 unsigned int lastpos = input.npos;
51 while (pos != input.npos)
56 if (lastpos == input.npos)
59 output.append(input.substr(0, pos));
65 std::string sub = input.substr(lastpos, pos-lastpos);
78 unsigned int endpos = input.find(
m_right, pos+
m_left.length());
80 if (endpos != input.npos)
83 std::string sub = input.substr(pos+
m_left.length(), endpos-pos-
m_left.length());
96 output.append(input.substr(pos, endpos-pos+
m_right.length()));
101 std::string toExpand = it->second;
102 std::string expanded =
"";
104 expand(toExpand, expanded, stripUnknown);
106 output.append(expanded);
110 lastpos = endpos+
m_right.length();
115 if (lastpos != input.npos)
118 output.append(input.substr(lastpos));
120 else if (!output.length() && pos == input.npos && lastpos == input.npos)