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

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

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 years, 1 month 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 | « base/strings/safe_sprintf.cc ('k') | base/strings/string_util_win.h » ('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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 BASE_EXPORT bool LowerCaseEqualsASCII(const char16* a_begin, 310 BASE_EXPORT bool LowerCaseEqualsASCII(const char16* a_begin,
311 const char16* a_end, 311 const char16* a_end,
312 const char* b); 312 const char* b);
313 313
314 // Performs a case-sensitive string compare. The behavior is undefined if both 314 // Performs a case-sensitive string compare. The behavior is undefined if both
315 // strings are not ASCII. 315 // strings are not ASCII.
316 BASE_EXPORT bool EqualsASCII(const string16& a, const StringPiece& b); 316 BASE_EXPORT bool EqualsASCII(const string16& a, const StringPiece& b);
317 317
318 } // namespace base 318 } // namespace base
319 319
320 #if defined(OS_WIN) 320 #if defined(OS_POSIX)
321 #include "base/strings/string_util_win.h"
322 #elif defined(OS_POSIX)
323 #include "base/strings/string_util_posix.h" 321 #include "base/strings/string_util_posix.h"
324 #else 322 #else
325 #error Define string operations appropriately for your platform 323 #error Define string operations appropriately for your platform
326 #endif 324 #endif
327 325
328 // Returns true if str starts with search, or false otherwise. 326 // Returns true if str starts with search, or false otherwise.
329 BASE_EXPORT bool StartsWithASCII(const std::string& str, 327 BASE_EXPORT bool StartsWithASCII(const std::string& str,
330 const std::string& search, 328 const std::string& search,
331 bool case_sensitive); 329 bool case_sensitive);
332 BASE_EXPORT bool StartsWith(const base::string16& str, 330 BASE_EXPORT bool StartsWith(const base::string16& str,
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 // string can contain wildcards like * and ? 496 // string can contain wildcards like * and ?
499 // The backslash character (\) is an escape character for * and ? 497 // The backslash character (\) is an escape character for * and ?
500 // We limit the patterns to having a max of 16 * or ? characters. 498 // We limit the patterns to having a max of 16 * or ? characters.
501 // ? matches 0 or 1 character, while * matches 0 or more characters. 499 // ? matches 0 or 1 character, while * matches 0 or more characters.
502 BASE_EXPORT bool MatchPattern(const base::StringPiece& string, 500 BASE_EXPORT bool MatchPattern(const base::StringPiece& string,
503 const base::StringPiece& pattern); 501 const base::StringPiece& pattern);
504 BASE_EXPORT bool MatchPattern(const base::string16& string, 502 BASE_EXPORT bool MatchPattern(const base::string16& string,
505 const base::string16& pattern); 503 const base::string16& pattern);
506 504
507 #endif // BASE_STRINGS_STRING_UTIL_H_ 505 #endif // BASE_STRINGS_STRING_UTIL_H_
OLDNEW
« no previous file with comments | « base/strings/safe_sprintf.cc ('k') | base/strings/string_util_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698