OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef URL_URL_UTIL_H_ | 5 #ifndef URL_URL_UTIL_H_ |
6 #define URL_URL_UTIL_H_ | 6 #define URL_URL_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 const char* spec, | 159 const char* spec, |
160 int spec_len, | 160 int spec_len, |
161 const Parsed& parsed, | 161 const Parsed& parsed, |
162 const Replacements<base::char16>& replacements, | 162 const Replacements<base::char16>& replacements, |
163 CharsetConverter* charset_converter, | 163 CharsetConverter* charset_converter, |
164 CanonOutput* output, | 164 CanonOutput* output, |
165 Parsed* out_parsed); | 165 Parsed* out_parsed); |
166 | 166 |
167 // String helper functions ---------------------------------------------------- | 167 // String helper functions ---------------------------------------------------- |
168 | 168 |
169 // Compare the lower-case form of the given string against the given ASCII | |
170 // string. This is useful for doing checking if an input string matches some | |
171 // token, and it is optimized to avoid intermediate string copies. | |
172 // | |
173 // The versions of this function that don't take a b_end assume that the b | |
174 // string is NULL terminated. | |
175 URL_EXPORT bool LowerCaseEqualsASCII(const char* a_begin, | |
176 const char* a_end, | |
177 const char* b); | |
178 URL_EXPORT bool LowerCaseEqualsASCII(const char* a_begin, | |
179 const char* a_end, | |
180 const char* b_begin, | |
181 const char* b_end); | |
182 URL_EXPORT bool LowerCaseEqualsASCII(const base::char16* a_begin, | |
183 const base::char16* a_end, | |
184 const char* b); | |
185 | |
186 // Unescapes the given string using URL escaping rules. | 169 // Unescapes the given string using URL escaping rules. |
187 URL_EXPORT void DecodeURLEscapeSequences(const char* input, | 170 URL_EXPORT void DecodeURLEscapeSequences(const char* input, |
188 int length, | 171 int length, |
189 CanonOutputW* output); | 172 CanonOutputW* output); |
190 | 173 |
191 // Escapes the given string as defined by the JS method encodeURIComponent. See | 174 // Escapes the given string as defined by the JS method encodeURIComponent. See |
192 // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeUR
IComponent | 175 // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeUR
IComponent |
193 URL_EXPORT void EncodeURIComponent(const char* input, | 176 URL_EXPORT void EncodeURIComponent(const char* input, |
194 int length, | 177 int length, |
195 CanonOutput* output); | 178 CanonOutput* output); |
196 | 179 |
197 } // namespace url | 180 } // namespace url |
198 | 181 |
199 #endif // URL_URL_UTIL_H_ | 182 #endif // URL_URL_UTIL_H_ |
OLD | NEW |