![]() |
ReplaceString() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Private Function |
Declared in: TCPRelayHTTP.h |
Declaration
BOOL ReplaceString(
std::string& rString) const;
DescriptionReplace the string
Function Body
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)
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |