]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/sbuf/StringConvert.h
2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_SRC_SBUF_SBUFSTRING_H_
10 #define SQUID_SRC_SBUF_SBUFSTRING_H_
12 #include "sbuf/SBuf.h"
13 #include "SquidString.h"
15 /// create a new SBuf from a String by copying contents
17 StringToSBuf(const String
&s
)
19 return SBuf(s
.rawBuf(), s
.size());
22 /** create a new String from a SBuf by copying contents
26 SBufToString(const SBuf
&s
)
29 rv
.limitInit(s
.rawContent(), s
.length());
33 #endif /* SQUID_SRC_SBUF_SBUFSTRING_H_ */