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

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

Issue 1117013006: Pull string_util for posix too (Closed) Base URL: https://chromium.googlesource.com/chromium/mini_chromium@master
Patch Set: . 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 | « no previous file | 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 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef MINI_CHROMIUM_BASE_STRINGS_STRING_UTIL_POSIX_H_ 5 #ifndef MINI_CHROMIUM_BASE_STRINGS_STRING_UTIL_POSIX_H_
6 #define MINI_CHROMIUM_BASE_STRINGS_STRING_UTIL_POSIX_H_ 6 #define MINI_CHROMIUM_BASE_STRINGS_STRING_UTIL_POSIX_H_
7 7
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 9
10 #include <stdio.h> 10 #include <stdio.h>
11 11
12 namespace base { 12 namespace base {
13 13
14 inline int vsnprintf(char* buffer, 14 inline int vsnprintf(char* buffer,
15 size_t size, 15 size_t size,
16 const char* format, va_list arguments) { 16 const char* format, va_list arguments) {
17 return ::vsnprintf(buffer, size, format, arguments); 17 return ::vsnprintf(buffer, size, format, arguments);
18 } 18 }
19 19
20 // Chromium code style is to not use malloc'd strings; this is only for use
21 // for interaction with APIs that require it.
22 inline char* strdup(const char* str) {
23 return ::strdup(str);
24 }
25
26 inline int strcasecmp(const char* string1, const char* string2) {
27 return ::strcasecmp(string1, string2);
28 }
29
30 inline int strncasecmp(const char* string1, const char* string2, size_t count) {
31 return ::strncasecmp(string1, string2, count);
32 }
33
20 } // namespace base 34 } // namespace base
21 35
22 #endif // MINI_CHROMIUM_BASE_STRINGS_STRING_UTIL_POSIX_H_ 36 #endif // MINI_CHROMIUM_BASE_STRINGS_STRING_UTIL_POSIX_H_
OLDNEW
« no previous file with comments | « no previous file | base/strings/string_util_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698