#include "base/InstanceId.h"
#include "base/TextException.h"
#include "Debug.h"
#include "globals.h"
#include "sbuf/forward.h"
#include "sbuf/MemBlob.h"
#include "sbuf/Stats.h"
#include <climits>
#include <iosfwd>
#include <iterator>

Go to the source code of this file.
Classes | |
class | SBufIterator |
class | SBufReverseIterator |
class | SBuf |
class | SBuf::Locker |
class | SBufReservationRequirements |
Named SBuf::reserve() parameters. Defaults ask for and restrict nothing. More... | |
Macros | |
#define | SQUIDSBUFPH "%.*s" |
#define | SQUIDSBUFPRINT(s) (s).plength(),(s).rawContent() |
Enumerations | |
enum | SBufCaseSensitive { caseSensitive, caseInsensitive } |
Functions | |
std::ostream & | operator<< (std::ostream &os, const SBuf &S) |
ostream output operator More... | |
SBuf | ToUpper (SBuf buf) |
Returns a lower-cased copy of its parameter. More... | |
SBuf | ToLower (SBuf buf) |
Returns an upper-cased copy of its parameter. More... | |
void | SBufToCstring (char *d, const SBuf &s) |
char * | SBufToCstring (const SBuf &s) |
Macro Definition Documentation
◆ SQUIDSBUFPH
#define SQUIDSBUFPH "%.*s" |
Definition at line 31 of file SBuf.h.
Referenced by authDigestNoncePurge(), HttpStateData::buildRequestPrefix(), buildUrlFromHost(), cacheDigestGuessStatsReport(), cacheDigestReport(), Fs::Ufs::UFSSwapDir::closeTmpSwapLog(), ErrorState::Convert(), MimeIcon::created(), Auth::User::CredentialsCacheStats(), Auth::SchemeConfig::dump(), ErrorState::Dump(), dump_cachemgrpasswd(), dump_denyinfo(), Security::ServerOptions::dumpCfg(), Security::PeerOptions::dumpCfg(), DumpInfo(), Ftp::Gateway::htmlifyListEntry(), Log::Format::HttpdCombined(), Log::Format::HttpdCommon(), internalRemoteUri(), mainHandleCommandLineOption(), Fs::Ufs::UFSSwapDir::openTmpSwapLog(), HttpRequest::pack(), HttpRequest::packFirstLineInto(), Security::PeerOptions::parseFlags(), Security::PeerOptions::parseOptions(), parsePortProtocol(), peerDigestStatsReport(), prepareAcceleratedURL(), ConnStateData::prepareTlsSwitchingURL(), prepareTransparentURL(), UrnState::setUriResFromRequest(), Log::Format::SquidNative(), Log::Format::SquidReferer(), MemObject::stat(), storeLog(), urlCanonicalCleanWithoutRequest(), urlMakeAbsolute(), whoisStart(), WIN32_InstallService(), WIN32_RemoveService(), and WIN32_sendSignal().
◆ SQUIDSBUFPRINT
#define SQUIDSBUFPRINT | ( | s | ) | (s).plength(),(s).rawContent() |
Definition at line 32 of file SBuf.h.
Referenced by authDigestNoncePurge(), HttpStateData::buildRequestPrefix(), buildUrlFromHost(), cacheDigestGuessStatsReport(), cacheDigestReport(), Fs::Ufs::UFSSwapDir::closeTmpSwapLog(), ErrorState::Convert(), MimeIcon::created(), Auth::User::CredentialsCacheStats(), Auth::SchemeConfig::dump(), ErrorState::Dump(), dump_cachemgrpasswd(), dump_denyinfo(), Security::ServerOptions::dumpCfg(), Security::PeerOptions::dumpCfg(), DumpInfo(), Ftp::Gateway::htmlifyListEntry(), Log::Format::HttpdCombined(), Log::Format::HttpdCommon(), internalRemoteUri(), mainHandleCommandLineOption(), Fs::Ufs::UFSSwapDir::openTmpSwapLog(), HttpRequest::pack(), HttpRequest::packFirstLineInto(), Security::PeerOptions::parseFlags(), Security::PeerOptions::parseOptions(), parsePortProtocol(), peerDigestStatsReport(), prepareAcceleratedURL(), ConnStateData::prepareTlsSwitchingURL(), prepareTransparentURL(), UrnState::setUriResFromRequest(), Log::Format::SquidNative(), Log::Format::SquidReferer(), MemObject::stat(), storeLog(), urlCanonicalCleanWithoutRequest(), urlMakeAbsolute(), whoisStart(), WIN32_InstallService(), WIN32_RemoveService(), and WIN32_sendSignal().
Enumeration Type Documentation
◆ SBufCaseSensitive
enum SBufCaseSensitive |
Function Documentation
◆ operator<<()
|
inline |
Definition at line 703 of file SBuf.h.
References SBuf::print().
◆ SBufToCstring() [1/2]
|
inline |
Copy an SBuf into a C-string.
Guarantees that the output is a c-string of length no more than SBuf::length()+1 by appending a \0 byte to the C-string copy of the SBuf contents.
- Note
- The destination c-string memory MUST be of at least length()+1 bytes.
No protection is added to prevent \0 bytes within the string. Unexpectedly short strings are a problem for the receiver to deal with if it cares.
Unlike SBuf::c_str() does not alter the SBuf in any way.
Definition at line 741 of file SBuf.h.
References SBuf::copy(), DBG_DATA, debugs, and SBuf::length().
Referenced by ConnStateData::buildFakeRequest(), ClientRequestContext::clientAccessCheckDone(), ftpReadType(), ftpTrySlashHack(), Http::One::Parser::getHeaderField(), UrnState::getHost(), gopher_request_parse(), ACLUrlPathStrategy::match(), ACLUrlStrategy::match(), parseHttpRequest(), ClientHttpRequest::resetRequest(), SBufToCstring(), and urlMakeAbsolute().
◆ SBufToCstring() [2/2]
|
inline |
Copy an SBuf into a C-string.
- Returns
- A dynamically allocated c-string based on SBuf. Use xfree() / safe_free() to release the c-string.
Definition at line 757 of file SBuf.h.
References SBuf::length(), SBufToCstring(), and xmalloc.
◆ ToLower()
Definition at line 718 of file SBuf.h.
References buf, and SBuf::toLower().
Referenced by testSBuf::testStringOps().
◆ ToUpper()
Definition at line 710 of file SBuf.h.
References buf, and SBuf::toUpper().
Referenced by parse_port_option(), and testSBuf::testStartsWith().