aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/strutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/stubs/strutil.h')
-rw-r--r--src/google/protobuf/stubs/strutil.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/strutil.h b/src/google/protobuf/stubs/strutil.h
index c04c1230..777694b7 100644
--- a/src/google/protobuf/stubs/strutil.h
+++ b/src/google/protobuf/stubs/strutil.h
@@ -265,6 +265,14 @@ LIBPROTOBUF_EXPORT int CEscapeString(const char* src, int src_len,
// ----------------------------------------------------------------------
LIBPROTOBUF_EXPORT string CEscape(const string& src);
+namespace strings {
+// Like CEscape() but does not escape bytes with the upper bit set.
+LIBPROTOBUF_EXPORT string Utf8SafeCEscape(const string& src);
+
+// Like CEscape() but uses hex (\x) escapes instead of octals.
+LIBPROTOBUF_EXPORT string CHexEscape(const string& src);
+} // namespace strings
+
// ----------------------------------------------------------------------
// strto32()
// strtou32()