| 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> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 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 std::string 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(std::string* 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 std::string 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> |
| 31 inline void SpdyStringAppendF(const Args&... args) { |
| 32 SpdyStringAppendFImpl(std::forward<const Args&>(args)...); |
| 33 } |
| 34 |
| 30 } // namespace net | 35 } // namespace net |
| 31 | 36 |
| 32 #endif // NET_SPDY_PLATFORM_API_SPDY_STRING_UTILS_H_ | 37 #endif // NET_SPDY_PLATFORM_API_SPDY_STRING_UTILS_H_ |
| OLD | NEW |