Home | History | Annotate | Download | only in brillo

Lines Matching refs:string

8 #include <string>
71 using Parameters = std::vector<std::pair<std::string, std::string>>;
73 // Combine a MIME type, subtype and parameters into a MIME string.
76 BRILLO_EXPORT std::string Combine(
77 const std::string& type,
78 const std::string& subtype,
81 // Splits a MIME string into type and subtype.
83 BRILLO_EXPORT bool Split(const std::string& mime_string,
84 std::string* type,
85 std::string* subtype);
87 // Splits a MIME string into type, subtype, and parameters.
89 BRILLO_EXPORT bool Split(const std::string& mime_string,
90 std::string* type,
91 std::string* subtype,
94 // Returns the MIME type from MIME string.
96 BRILLO_EXPORT std::string GetType(const std::string& mime_string);
98 // Returns the MIME sub-type from MIME string.
100 BRILLO_EXPORT std::string GetSubtype(const std::string& mime_string);
102 // Returns the MIME parameters from MIME string.
104 BRILLO_EXPORT Parameters GetParameters(const std::string& mime_string);
106 // Removes parameters from a MIME string
108 BRILLO_EXPORT std::string RemoveParameters(
109 const std::string& mime_string) WARN_UNUSED_RESULT;
111 // Appends a parameter to a MIME string.
113 BRILLO_EXPORT std::string AppendParameter(
114 const std::string& mime_string,
115 const std::string& paramName,
116 const std::string& paramValue) WARN_UNUSED_RESULT;
118 // Returns the value of a parameter on a MIME string (empty string if missing).
120 BRILLO_EXPORT std::string GetParameterValue(const std::string& mime_string,
121 const std::string& paramName);