OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_SPDY_PLATFORM_API_SPDY_STRING_UTILS_H_ | 5 #ifndef NET_SPDY_PLATFORM_API_SPDY_STRING_UTILS_H_ |
6 #define NET_SPDY_PLATFORM_API_SPDY_STRING_UTILS_H_ | 6 #define NET_SPDY_PLATFORM_API_SPDY_STRING_UTILS_H_ |
7 | 7 |
8 #include <string> | |
9 #include <utility> | 8 #include <utility> |
10 | 9 |
| 10 #include "net/spdy/platform/api/spdy_string.h" |
11 #include "net/spdy/platform/impl/spdy_string_utils_impl.h" | 11 #include "net/spdy/platform/impl/spdy_string_utils_impl.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 template <typename... Args> | 15 template <typename... Args> |
16 inline std::string SpdyStrCat(const Args&... args) { | 16 inline SpdyString SpdyStrCat(const Args&... args) { |
17 return SpdyStrCatImpl(std::forward<const Args&>(args)...); | 17 return SpdyStrCatImpl(std::forward<const Args&>(args)...); |
18 } | 18 } |
19 | 19 |
20 template <typename... Args> | 20 template <typename... Args> |
21 inline void SpdyStrAppend(std::string* output, const Args&... args) { | 21 inline void SpdyStrAppend(SpdyString* output, const Args&... args) { |
22 SpdyStrAppendImpl(output, std::forward<const Args&>(args)...); | 22 SpdyStrAppendImpl(output, std::forward<const Args&>(args)...); |
23 } | 23 } |
24 | 24 |
25 template <typename... Args> | 25 template <typename... Args> |
26 inline std::string SpdyStringPrintf(const Args&... args) { | 26 inline SpdyString SpdyStringPrintf(const Args&... args) { |
27 return SpdyStringPrintfImpl(std::forward<const Args&>(args)...); | 27 return SpdyStringPrintfImpl(std::forward<const Args&>(args)...); |
28 } | 28 } |
29 | 29 |
30 template <typename... Args> | 30 template <typename... Args> |
31 inline void SpdyStringAppendF(const Args&... args) { | 31 inline void SpdyStringAppendF(const Args&... args) { |
32 SpdyStringAppendFImpl(std::forward<const Args&>(args)...); | 32 SpdyStringAppendFImpl(std::forward<const Args&>(args)...); |
33 } | 33 } |
34 | 34 |
35 inline char SpdyHexDigitToInt(char c) { | 35 inline char SpdyHexDigitToInt(char c) { |
36 return SpdyHexDigitToIntImpl(c); | 36 return SpdyHexDigitToIntImpl(c); |
37 } | 37 } |
38 | 38 |
39 } // namespace net | 39 } // namespace net |
40 | 40 |
41 #endif // NET_SPDY_PLATFORM_API_SPDY_STRING_UTILS_H_ | 41 #endif // NET_SPDY_PLATFORM_API_SPDY_STRING_UTILS_H_ |
OLD | NEW |