Encodes a src string into a base64 string, like Base64Escape() does, but outputs '‐' instead of '+' and '_' instead of '/', and does not pad the output. This function conforms with RFC 4648 section 5 (base64url).

Synopsis

Declared in <absl/strings/escaping.h>

std::string
WebSafeBase64Escape(std::string_view src);

Return Value

The web‐safe base64‐encoded string.

Parameters

Name

Description

src

The string to encode.

Created with MrDocs