#include "base/TextException.h"
#include "debug/Stream.h"
+#include "sbuf/forward.h"
#include <ostream>
void append(char const *buf);
void append(char const);
void append(String const &);
+ void append(const SBuf &); ///< adds the entire given buffer
void absorb(String &old);
const char * pos(char const *aString) const;
const char * pos(char const ch) const;
#include "squid.h"
#include "mem/forward.h"
+#include "sbuf/SBuf.h"
#include "SquidString.h"
#include <climits>
append(old.rawBuf(), old.len_);
}
+void
+String::append(const SBuf &buf)
+{
+ append(buf.rawContent(), buf.length());
+}
+
void
String::absorb(String &old)
{
SBuf authority = request->url.authority(request->url.getScheme() != AnyP::PROTO_FTP);
- title_url.append(authority.rawContent(), authority.length());
- title_url.append(request->url.path().rawContent(), request->url.path().length());
+ title_url.append(authority);
+ title_url.append(request->url.path());
base_href = "ftp://";
base_href.append("@");
}
- base_href.append(authority.rawContent(), authority.length());
- base_href.append(request->url.path().rawContent(), request->url.path().length());
+ base_href.append(authority);
+ base_href.append(request->url.path());
base_href.append("/");
}
{
assert(id >= 0);
String addr = channelPathPfx;
- addr.append(service_name.c_str());
+ addr.append(service_name);
addr.append(processLabel);
addr.append('-');
addr.append(xitoa(id));
static String coordinatorAddr;
if (!coordinatorAddr.size()) {
coordinatorAddr= channelPathPfx;
- coordinatorAddr.append(service_name.c_str());
+ coordinatorAddr.append(service_name);
coordinatorAddr.append(coordinatorAddrLabel);
coordinatorAddr.append(".ipc");
}
name.append('/');
} else {
name.append('/');
- name.append(service_name.c_str());
+ name.append(service_name);
name.append('-');
}