Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / ipc / chromium / src / base / string_util_posix.h
blob02818a644173eb67e1f303d6508bd474123f2b26
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file.
7 #ifndef BASE_STRING_UTIL_POSIX_H_
8 #define BASE_STRING_UTIL_POSIX_H_
10 #include <stdarg.h>
11 #include <stdio.h>
12 #include <string.h>
13 #include <wchar.h>
15 #include "base/logging.h"
17 namespace base {
19 // Chromium code style is to not use malloc'd strings; this is only for use
20 // for interaction with APIs that require it.
21 inline char* strdup(const char* str) { return ::strdup(str); }
23 inline int strcasecmp(const char* string1, const char* string2) {
24 return ::strcasecmp(string1, string2);
27 inline int strncasecmp(const char* string1, const char* string2, size_t count) {
28 return ::strncasecmp(string1, string2, count);
31 inline int vsnprintf(char* buffer, size_t size, const char* format,
32 va_list arguments) {
33 return ::vsnprintf(buffer, size, format, arguments);
36 inline int vswprintf(wchar_t* buffer, size_t size, const wchar_t* format,
37 va_list arguments) {
38 DCHECK(IsWprintfFormatPortable(format));
39 return ::vswprintf(buffer, size, format, arguments);
42 } // namespace base
44 #endif // BASE_STRING_UTIL_POSIX_H_