Home | History | Annotate | Download | only in brillo

Lines Matching refs:string

8 #include <string>
18 using WebParamList = std::vector<std::pair<std::string, std::string>>;
20 // Encode/escape string to be used in the query portion of a URL.
23 BRILLO_EXPORT std::string UrlEncode(const char* data, bool encodeSpaceAsPlus);
25 inline std::string UrlEncode(const char* data) {
31 BRILLO_EXPORT std::string UrlDecode(const char* data);
33 // Converts a list of key-value pairs into a string compatible with
35 BRILLO_EXPORT std::string WebParamsEncode(const WebParamList& params,
38 inline std::string WebParamsEncode(const WebParamList& params) {
42 // Parses a string of '&'-delimited key-value pairs (separated by '=') and
45 BRILLO_EXPORT WebParamList WebParamsDecode(const std::string& data);
48 BRILLO_EXPORT std::string Base64Encode(const void* data, size_t size);
52 BRILLO_EXPORT std::string Base64EncodeWrapLines(const void* data, size_t size);
54 // Decodes the input string from Base64.
55 BRILLO_EXPORT bool Base64Decode(const std::string& input, brillo::Blob* output);
57 // Helper wrappers to use std::string and brillo::Blob as binary data
59 inline std::string Base64Encode(const brillo::Blob& input) {
62 inline std::string Base64EncodeWrapLines(const brillo::Blob& input) {
65 inline std::string Base64Encode(const std::string& input) {
68 inline std::string Base64EncodeWrapLines(const std::string& input) {
71 inline bool Base64Decode(const std::string& input, std::string* output) {
75 *output = std::string{blob.begin(), blob.end()};