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

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

Issue 1119173003: win: pull in string_util_win.h from Chromium for strcasecmp (Closed) Base URL: https://chromium.googlesource.com/chromium/mini_chromium@master
Patch Set: cleanup Created 5 years, 7 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 | « base/strings/string_util.h ('k') | 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BASE_STRINGS_STRING_UTIL_WIN_H_
6 #define BASE_STRINGS_STRING_UTIL_WIN_H_
7
8 #include <stdio.h>
9 #include <string.h>
10 #include <wchar.h>
11
12 #include "base/strings/string16.h"
13
14 namespace base {
15
16 // Chromium code style is to not use malloc'd strings; this is only for use
17 // for interaction with APIs that require it.
18 inline char* strdup(const char* str) {
19 return _strdup(str);
20 }
21
22 inline int strcasecmp(const char* s1, const char* s2) {
23 return _stricmp(s1, s2);
24 }
25
26 inline int strncasecmp(const char* s1, const char* s2, size_t count) {
27 return _strnicmp(s1, s2, count);
28 }
29
30 inline int strncmp16(const char16* s1, const char16* s2, size_t count) {
31 return wcsncmp(s1, s2, count);
32 }
33
34 } // namespace base
35
36 #endif // BASE_STRINGS_STRING_UTIL_WIN_H_
OLDNEW
« no previous file with comments | « base/strings/string_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698