Sha256: b493f78af8208ae76d62c758da78012930b67e0b58cf1f108df71158b9d7a4f1

Contents?: true

Size: 1020 Bytes

Versions: 32

Compression:

Stored size: 1020 Bytes

Contents

/**
 * @file pm_strncasecmp.h
 *
 * A custom strncasecmp implementation.
 */
#ifndef PRISM_STRNCASECMP_H
#define PRISM_STRNCASECMP_H

#include "prism/defines.h"

#include <ctype.h>
#include <stddef.h>
#include <stdint.h>

/**
 * Compare two strings, ignoring case, up to the given length. Returns 0 if the
 * strings are equal, a negative number if string1 is less than string2, or a
 * positive number if string1 is greater than string2.
 *
 * Note that this is effectively our own implementation of strncasecmp, but it's
 * not available on all of the platforms we want to support so we're rolling it
 * here.
 *
 * @param string1 The first string to compare.
 * @param string2 The second string to compare
 * @param length The maximum number of characters to compare.
 * @return 0 if the strings are equal, a negative number if string1 is less than
 *     string2, or a positive number if string1 is greater than string2.
 */
int pm_strncasecmp(const uint8_t *string1, const uint8_t *string2, size_t length);

#endif

Version data entries

32 entries across 24 versions & 5 rubygems

Version Path
datadog-ruby_core_source-3.3.6 lib/datadog/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_strncasecmp.h
datadog-ruby_core_source-3.3.6 lib/datadog/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strncasecmp.h
datadog-ruby_core_source-3.3.6 lib/datadog/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strncasecmp.h
datadog-ruby_core_source-3.3.6 lib/datadog/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strncasecmp.h
prism-1.2.0 include/prism/util/pm_strncasecmp.h
debase-ruby_core_source-3.3.6 lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strncasecmp.h
debase-ruby_core_source-3.3.6 lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_strncasecmp.h
debase-ruby_core_source-3.3.6 lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strncasecmp.h
debase-ruby_core_source-3.3.6 lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strncasecmp.h
debase-ruby_core_source-3.3.5 lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strncasecmp.h
debase-ruby_core_source-3.3.5 lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strncasecmp.h
debase-ruby_core_source-3.3.5 lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strncasecmp.h
prism-1.1.0 include/prism/util/pm_strncasecmp.h
prism-1.0.0 include/prism/util/pm_strncasecmp.h
prism-0.30.0 include/prism/util/pm_strncasecmp.h
prism-0.28.0 include/prism/util/pm_strncasecmp.h
prism-0.27.0 include/prism/util/pm_strncasecmp.h
prism-0.26.0 include/prism/util/pm_strncasecmp.h
prism-0.25.0 include/prism/util/pm_strncasecmp.h
avalara_sdk-24.2.29 vendor/bundle/ruby/2.7.0/gems/debase-ruby_core_source-3.3.1/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strncasecmp.h