---
name: "memcchr"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/memcchr"
---

# memcchr(9)

locate the complement of a byte in byte string

## NAME

**memcchr** – locate the complement of a byte in byte string

## SYNOPSIS

**#include \<sys/libkern.h\>**

*void* *\**\

**memcchr**(*const void \*b*, *int c*, *size\_t len*);

## DESCRIPTION

The **memcchr**() function locates the first occurrence of a byte unequal to *c* (converted to an *unsigned char*) in string *b*.

## RETURN VALUES

The **memcchr**() function returns a pointer to the byte located, or NULL if no such byte exists within *len* bytes.

## SEE ALSO

[memchr(3)](/memchr/3.md)

## HISTORY

The **memcchr**() function first appeared in FreeBSD 10.0.
