OLD | NEW |
(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_ |
OLD | NEW |