Add ToString() methods to classes with << operators, preparing for deprecations.
Bug: webrtc:8982
Change-Id: I9b8792a229539dd9848f4d9936fe343f4bf9ad49
Reviewed-on: https://webrtc-review.googlesource.com/63200
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22705}
diff --git a/rtc_base/stringutils.h b/rtc_base/stringutils.h
index 686402c..386ca9e 100644
--- a/rtc_base/stringutils.h
+++ b/rtc_base/stringutils.h
@@ -78,7 +78,7 @@
return strncasecmp(s1, s2, n);
}
-#endif // WEBRTC_POSIX
+#endif // WEBRTC_POSIX
///////////////////////////////////////////////////////////////////////////////
// Traits simplifies porting string functions to be CTYPE-agnostic
@@ -91,9 +91,9 @@
template<class CTYPE>
struct Traits {
// STL string type
- //typedef XXX string;
+ // typedef XXX string;
// Null-terminated string
- //inline static const CTYPE* empty_str();
+ // inline static const CTYPE* empty_str();
};
///////////////////////////////////////////////////////////////////////////////
@@ -119,7 +119,7 @@
template<class CTYPE>
const CTYPE* strchrn(const CTYPE* str, size_t slen, CTYPE ch) {
- for (size_t i=0; i<slen && str[i]; ++i) {
+ for (size_t i=0; i < slen && str[i]; ++i) {
if (str[i] == ch) {
return str + i;
}
@@ -312,6 +312,7 @@
// Remove leading and trailing whitespaces.
std::string string_trim(const std::string& s);
+std::string ToHex(const int i);
} // namespace rtc
-#endif // RTC_BASE_STRINGUTILS_H_
+#endif // RTC_BASE_STRINGUTILS_H_