#include "base/InstanceId.h"
#include "base/TextException.h"
#include "debug/Stream.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
◆ SQUIDSBUFPRINT
Enumeration Type Documentation
◆ SBufCaseSensitive
enum SBufCaseSensitive |
Function Documentation
◆ operator<<()
|
inline |
Definition at line 713 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 752 of file SBuf.h.
References SBuf::copy(), DBG_DATA, debugs, and SBuf::length().
Referenced by ConnStateData::buildFakeRequest(), ClientRequestContext::clientAccessCheckDone(), Acl::FinalizedParameterizedNode< Parent >::FinalizePoolLabel(), ftpReadType(), ftpTrySlashHack(), Http::One::Parser::getHostHeaderField(), Acl::UrlCheck::match(), Acl::UrlPathCheck::match(), AnyP::Uri::parse(), ConnStateData::parseHttpRequest(), ClientHttpRequest::resetRequestXXX(), SBufToCstring(), and urnParseReply().
◆ 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 768 of file SBuf.h.
References SBuf::length(), SBufToCstring(), and xmalloc.
◆ ToLower()
Definition at line 729 of file SBuf.h.
References SBuf::toLower().
Referenced by TestSBuf::testStringOps().
◆ ToUpper()
Definition at line 721 of file SBuf.h.
References SBuf::toUpper().
Referenced by parse_port_option(), and TestSBuf::testStartsWith().