summaryrefslogtreecommitdiff
path: root/absl/strings
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2022-11-30 12:46:08 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2022-11-30 12:46:46 -0800
commit296abbd35a600785d6297738749336061ecb2221 (patch)
tree232faa0ecce56061f7d2acb64e931cf480e2df65 /absl/strings
parent66665d8d2e3fedff340b83f9841ca427145a7b26 (diff)
Reorder base64 unescape methods to be below the escaping methods.
PiperOrigin-RevId: 491992941 Change-Id: Id66154cc4561770047b55625ef00014602975c5d
Diffstat (limited to 'absl/strings')
-rw-r--r--absl/strings/escaping.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/absl/strings/escaping.h b/absl/strings/escaping.h
index e8d2912b..d2c18e02 100644
--- a/absl/strings/escaping.h
+++ b/absl/strings/escaping.h
@@ -117,6 +117,22 @@ std::string Utf8SafeCEscape(absl::string_view src);
// conversion.
std::string Utf8SafeCHexEscape(absl::string_view src);
+// Base64Escape()
+//
+// Encodes a `src` string into a base64-encoded 'dest' string with padding
+// characters. This function conforms with RFC 4648 section 4 (base64) and RFC
+// 2045. See also CalculateBase64EscapedLen().
+void Base64Escape(absl::string_view src, std::string* dest);
+std::string Base64Escape(absl::string_view src);
+
+// WebSafeBase64Escape()
+//
+// Encodes a `src` string into a base64 string, like Base64Escape() does, but
+// outputs '-' instead of '+' and '_' instead of '/', and does not pad 'dest'.
+// This function conforms with RFC 4648 section 5 (base64url).
+void WebSafeBase64Escape(absl::string_view src, std::string* dest);
+std::string WebSafeBase64Escape(absl::string_view src);
+
// Base64Unescape()
//
// Converts a `src` string encoded in Base64 to its binary equivalent, writing
@@ -135,22 +151,6 @@ bool Base64Unescape(absl::string_view src, std::string* dest);
// padding, '=' and '.' are treated identically.
bool WebSafeBase64Unescape(absl::string_view src, std::string* dest);
-// Base64Escape()
-//
-// Encodes a `src` string into a base64-encoded 'dest' string with padding
-// characters. This function conforms with RFC 4648 section 4 (base64) and RFC
-// 2045. See also CalculateBase64EscapedLen().
-void Base64Escape(absl::string_view src, std::string* dest);
-std::string Base64Escape(absl::string_view src);
-
-// WebSafeBase64Escape()
-//
-// Encodes a `src` string into a base64 string, like Base64Escape() does, but
-// outputs '-' instead of '+' and '_' instead of '/', and does not pad 'dest'.
-// This function conforms with RFC 4648 section 5 (base64url).
-void WebSafeBase64Escape(absl::string_view src, std::string* dest);
-std::string WebSafeBase64Escape(absl::string_view src);
-
// HexStringToBytes()
//
// Converts an ASCII hex string into bytes, returning binary data of length