Sha256: 981d67e938fc0e6687cbdee2b1ec47478cb09ac2896b36f66105e73262fd0bca

Contents?: true

Size: 792 Bytes

Versions: 18

Compression:

Stored size: 792 Bytes

Contents

// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This file defines utility functions for working with strings.

#ifndef BASE_STRING_UTIL_H_
#define BASE_STRING_UTIL_H_

#include <string.h>

namespace base {

#ifdef WIN32
// Compare the two strings s1 and s2 without regard to case using
// the current locale; returns 0 if they are equal, 1 if s1 > s2, and -1 if
// s2 > s1 according to a lexicographic comparison.
inline int strcasecmp(const char* s1, const char* s2) {
  return _stricmp(s1, s2);
}
#else
inline int strcasecmp(const char* s1, const char* s2) {
  return ::strcasecmp(s1, s2);
}
#endif

}

#endif  // BASE_STRING_UTIL_H_

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
cld-0.13.0 ext/cld/base/string_util.h
language_detection-0.1.1 ext/cld/base/string_util.h
cld-0.12.0 ext/cld/base/string_util.h
language_detection-0.1.0 ext/cld/base/string_util.h
cld-0.11.0 ext/cld/base/string_util.h
cld-0.10.0 ext/cld/base/string_util.h
cld-0.8.0 ext/cld/base/string_util.h
cld-fixed-0.7.1 ext/cld/base/string_util.h
cld-0.7.0 ext/cld/base/string_util.h
language_detection-0.0.2 ext/cld/base/string_util.h
language_detection-0.0.1 ext/cld/base/string_util.h
cld-0.6.0 ext/cld/base/string_util.h
cld-0.5.0 ext/cld/base/string_util.h
krukid-cld-0.4.0 base/string_util.h
cld-0.4.0 base/string_util.h
cld-0.3.0 base/string_util.h
cld-0.2.0 base/string_util.h
cld-0.1.0 base/string_util.h