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

Side by Side Diff: third_party/cld/base/string_util.h

Issue 7112014: cld: Fix infinite recursion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <string.h> 10 #include <string.h>
11 11
12 namespace base { 12 namespace base {
13 13
14 #ifdef WIN32 14 #ifdef WIN32
15 // Compare the two strings s1 and s2 without regard to case using 15 // Compare the two strings s1 and s2 without regard to case using
16 // the current locale; returns 0 if they are equal, 1 if s1 > s2, and -1 if 16 // the current locale; returns 0 if they are equal, 1 if s1 > s2, and -1 if
17 // s2 > s1 according to a lexicographic comparison. 17 // s2 > s1 according to a lexicographic comparison.
18 inline int strcasecmp(const char* s1, const char* s2) { 18 inline int strcasecmp(const char* s1, const char* s2) {
19 return _stricmp(s1, s2); 19 return _stricmp(s1, s2);
20 } 20 }
21 #else 21 #else
22 inline int strcasecmp(const char* s1, const char* s2) { 22 inline int strcasecmp(const char* s1, const char* s2) {
23 return strcasecmp(s1, s2); 23 return ::strcasecmp(s1, s2);
24 } 24 }
25 #endif 25 #endif
26 26
27 } 27 }
28 28
29 #endif // BASE_STRING_UTIL_H_ 29 #endif // BASE_STRING_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698