Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: base/strings/string_util.h

Issue 1098843004: Omnibox - Do Not Allow HTTP/HTTPS Equivalence if User Explicitly Entered A Scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot string implementation Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/strings/string_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This file defines utility functions for working with strings. 5 // This file defines utility functions for working with strings.
6 6
7 #ifndef BASE_STRINGS_STRING_UTIL_H_ 7 #ifndef BASE_STRINGS_STRING_UTIL_H_
8 #define BASE_STRINGS_STRING_UTIL_H_ 8 #define BASE_STRINGS_STRING_UTIL_H_
9 9
10 #include <ctype.h> 10 #include <ctype.h>
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 const char* b); 318 const char* b);
319 319
320 // Performs a case-sensitive string compare. The behavior is undefined if both 320 // Performs a case-sensitive string compare. The behavior is undefined if both
321 // strings are not ASCII. 321 // strings are not ASCII.
322 BASE_EXPORT bool EqualsASCII(const base::string16& a, const base::StringPiece& b ); 322 BASE_EXPORT bool EqualsASCII(const base::string16& a, const base::StringPiece& b );
323 323
324 // Returns true if str starts with search, or false otherwise. 324 // Returns true if str starts with search, or false otherwise.
325 BASE_EXPORT bool StartsWithASCII(const std::string& str, 325 BASE_EXPORT bool StartsWithASCII(const std::string& str,
326 const std::string& search, 326 const std::string& search,
327 bool case_sensitive); 327 bool case_sensitive);
328 BASE_EXPORT bool StartsWith(const std::string& str,
329 const std::string& search,
330 bool case_sensitive);
328 BASE_EXPORT bool StartsWith(const base::string16& str, 331 BASE_EXPORT bool StartsWith(const base::string16& str,
329 const base::string16& search, 332 const base::string16& search,
330 bool case_sensitive); 333 bool case_sensitive);
331 334
332 // Returns true if str ends with search, or false otherwise. 335 // Returns true if str ends with search, or false otherwise.
333 BASE_EXPORT bool EndsWith(const std::string& str, 336 BASE_EXPORT bool EndsWith(const std::string& str,
334 const std::string& search, 337 const std::string& search,
335 bool case_sensitive); 338 bool case_sensitive);
336 BASE_EXPORT bool EndsWith(const base::string16& str, 339 BASE_EXPORT bool EndsWith(const base::string16& str,
337 const base::string16& search, 340 const base::string16& search,
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 #elif defined(WCHAR_T_IS_UTF32) 526 #elif defined(WCHAR_T_IS_UTF32)
524 typedef uint32 Unsigned; 527 typedef uint32 Unsigned;
525 #endif 528 #endif
526 }; 529 };
527 template<> 530 template<>
528 struct ToUnsigned<short> { 531 struct ToUnsigned<short> {
529 typedef unsigned short Unsigned; 532 typedef unsigned short Unsigned;
530 }; 533 };
531 534
532 #endif // BASE_STRINGS_STRING_UTIL_H_ 535 #endif // BASE_STRINGS_STRING_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/strings/string_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698