| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_STRING_UTIL_H_ | 7 #ifndef BASE_STRING_UTIL_H_ |
| 8 #define BASE_STRING_UTIL_H_ | 8 #define BASE_STRING_UTIL_H_ |
| 9 | 9 |
| 10 #include <stdarg.h> // va_list | 10 #include <stdarg.h> // va_list |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 const std::string& search, | 284 const std::string& search, |
| 285 bool case_sensitive); | 285 bool case_sensitive); |
| 286 bool StartsWith(const std::wstring& str, | 286 bool StartsWith(const std::wstring& str, |
| 287 const std::wstring& search, | 287 const std::wstring& search, |
| 288 bool case_sensitive); | 288 bool case_sensitive); |
| 289 bool StartsWith(const string16& str, | 289 bool StartsWith(const string16& str, |
| 290 const string16& search, | 290 const string16& search, |
| 291 bool case_sensitive); | 291 bool case_sensitive); |
| 292 | 292 |
| 293 // Returns true if str ends with search, or false otherwise. | 293 // Returns true if str ends with search, or false otherwise. |
| 294 bool EndsWith(const std::string& str, |
| 295 const std::string& search, |
| 296 bool case_sensitive); |
| 294 bool EndsWith(const std::wstring& str, | 297 bool EndsWith(const std::wstring& str, |
| 295 const std::wstring& search, | 298 const std::wstring& search, |
| 296 bool case_sensitive); | 299 bool case_sensitive); |
| 297 bool EndsWith(const string16& str, | 300 bool EndsWith(const string16& str, |
| 298 const string16& search, | 301 const string16& search, |
| 299 bool case_sensitive); | 302 bool case_sensitive); |
| 300 | 303 |
| 301 | 304 |
| 302 // Determines the type of ASCII character, independent of locale (the C | 305 // Determines the type of ASCII character, independent of locale (the C |
| 303 // library versions will change based on locale). | 306 // library versions will change based on locale). |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 #elif defined(WCHAR_T_IS_UTF32) | 610 #elif defined(WCHAR_T_IS_UTF32) |
| 608 typedef uint32 Unsigned; | 611 typedef uint32 Unsigned; |
| 609 #endif | 612 #endif |
| 610 }; | 613 }; |
| 611 template<> | 614 template<> |
| 612 struct ToUnsigned<short> { | 615 struct ToUnsigned<short> { |
| 613 typedef unsigned short Unsigned; | 616 typedef unsigned short Unsigned; |
| 614 }; | 617 }; |
| 615 | 618 |
| 616 #endif // BASE_STRING_UTIL_H_ | 619 #endif // BASE_STRING_UTIL_H_ |
| OLD | NEW |