squid-
cache.org
Optimising Web Delivery
Docs
Download
Donate
Support
About
Contact
Shop
Blog
src
sbuf
StringConvert.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3
*
4
* Squid software is distributed under GPLv2+ license and includes
5
* contributions from numerous individuals and organizations.
6
* Please see the COPYING and CONTRIBUTORS files for details.
7
*/
8
9
#ifndef SQUID_SRC_SBUF_SBUFSTRING_H_
10
#define SQUID_SRC_SBUF_SBUFSTRING_H_
11
12
#include "
sbuf/SBuf.h
"
13
#include "
SquidString.h
"
14
16
inline
SBuf
17
StringToSBuf
(
const
String
&s)
18
{
19
return
SBuf
(s.
rawBuf
(), s.
size
());
20
}
21
25
inline
String
26
SBufToString
(
const
SBuf
&s)
27
{
28
String
rv;
29
rv.
assign
(s.
rawContent
(), s.
length
());
30
return
rv;
31
}
32
33
#endif
/* SQUID_SRC_SBUF_SBUFSTRING_H_ */
34
SBuf.h
SquidString.h
SBufToString
String SBufToString(const SBuf &s)
Definition:
StringConvert.h:26
StringToSBuf
SBuf StringToSBuf(const String &s)
create a new SBuf from a String by copying contents
Definition:
StringConvert.h:17
SBuf
Definition:
SBuf.h:94
SBuf::rawContent
const char * rawContent() const
Definition:
SBuf.cc:509
SBuf::length
size_type length() const
Returns the number of bytes stored in SBuf.
Definition:
SBuf.h:415
String
Definition:
SquidString.h:26
String::assign
void assign(const char *str, int len)
Definition:
String.cc:78
String::rawBuf
char const * rawBuf() const
Definition:
SquidString.h:86
String::size
size_type size() const
Definition:
SquidString.h:73
Introduction
About Squid
Why Squid?
Squid Developers
How to Donate
How to Help Out
Getting Squid
Squid Source Packages
Squid Deployment Case-Studies
Squid Software Foundation
Documentation
Quick Setup
Configuration:
Reference
Examples
FAQ
and
Wiki
Guide Books:
Beginners
Definitive
Non-English
More...
Support
Security Advisories
Bugzilla Database
Mailing lists
Contacting us
Commercial services
Project Sponsors
Squid-based products
Miscellaneous
Developer Resources
Related Writings
Related Software:
Authenticators
Ecap
Icap
Ident
Log Analysis
Monitor
Proxies
Redirectors
General
Squid Artwork
Web Site Translations
Japanese
Mirrors
Website:
il
...
full list
FTP Package Archive