SBuf.h File Reference
#include "base/InstanceId.h"
#include "Debug.h"
#include "globals.h"
#include "sbuf/Exceptions.h"
#include "sbuf/forward.h"
#include "sbuf/MemBlob.h"
#include "sbuf/Stats.h"
#include <climits>
#include <cstdarg>
#include <iosfwd>
#include <iterator>
Include dependency graph for SBuf.h:
This graph shows which files directly or indirectly include this file:

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

Enumeration Type Documentation

Enumerator
caseSensitive 
caseInsensitive 

Definition at line 37 of file SBuf.h.

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const SBuf S 
)
inline

Definition at line 705 of file SBuf.h.

References SBuf::print().

void SBufToCstring ( char *  d,
const SBuf s 
)
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 743 of file SBuf.h.

References SBuf::copy(), DBG_DATA, debugs, and SBuf::length().

Referenced by ConnStateData::buildFakeRequest(), ClientRequestContext::clientAccessCheckDone(), ClientRequestContext::clientRedirectDone(), ftpReadType(), ftpTrySlashHack(), Http::One::Parser::getHeaderField(), UrnState::getHost(), gopher_request_parse(), ClientHttpRequest::handleAdaptedHeader(), ACLUrlPathStrategy::match(), ACLUrlStrategy::match(), parseHttpRequest(), SBufToCstring(), and urlMakeAbsolute().

char* SBufToCstring ( const SBuf s)
inline

Copy an SBuf into a C-string.

See Also
SBufToCstring(char *d, const SBuf &s)
Returns
A dynamically allocated c-string based on SBuf. Use xfree() / safe_free() to release the c-string.

Definition at line 759 of file SBuf.h.

References SBuf::length(), SBufToCstring(), and xmalloc.

SBuf ToLower ( SBuf  buf)
inline

Definition at line 720 of file SBuf.h.

References buf, and SBuf::toLower().

Referenced by testSBuf::testStringOps().

SBuf ToUpper ( SBuf  buf)
inline

Definition at line 712 of file SBuf.h.

References buf, and SBuf::toUpper().

Referenced by parse_port_option(), and testSBuf::testStartsWith().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors