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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/strings/string_util_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_util_posix.h
diff --git a/base/strings/string_util_posix.h b/base/strings/string_util_posix.h
index 3ca72dd74fd8801fc4f6bd1d5a6a69febefd894b..2a922ecb16dbe0d48ad0d0d074f5c88bf855a673 100644
--- a/base/strings/string_util_posix.h
+++ b/base/strings/string_util_posix.h
@@ -17,6 +17,20 @@ inline int vsnprintf(char* buffer,
return ::vsnprintf(buffer, size, format, arguments);
}
+// Chromium code style is to not use malloc'd strings; this is only for use
+// for interaction with APIs that require it.
+inline char* strdup(const char* str) {
+ return ::strdup(str);
+}
+
+inline int strcasecmp(const char* string1, const char* string2) {
+ return ::strcasecmp(string1, string2);
+}
+
+inline int strncasecmp(const char* string1, const char* string2, size_t count) {
+ return ::strncasecmp(string1, string2, count);
+}
+
} // namespace base
#endif // MINI_CHROMIUM_BASE_STRINGS_STRING_UTIL_POSIX_H_
« 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