![]() |
ReplaceString() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Private Function |
Declared in: TCPRelayHTTP.h |
BOOL ReplaceString( std::string& rString) const;
Replace the string
try { //Find the string std::string::size_type aPos; aPos=rString.find(m_sBindAddress, 0); //Do we have it if (aPos!=std::string::npos) { std::string sNewString; sNewString.reserve(rString.size()+30); //Take the part before the host sNewString=rString.substr(0, aPos); //Add the new address sNewString+=m_sTargetAddress; //Add what's left sNewString+=rString.substr(aPos+ m_sBindAddress.length(), rString.length()- aPos- m_sBindAddress.length()); //Give it to our string rString.swap(sNewString); //Done return TRUE; } else return FALSE; } ERROR_HANDLER_RETURN("ReplaceString",FALSE)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |