---
name: "bstring"
section: "3"
platform: "macos"
package: "Libc"
version: "1752.120.2"
release: "macOS 26.5"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/bstring"
---

# bstring(3)

byte string operations

## NAME

**bcmp**, **bcopy**, **bzero**, **memccpy**, **memchr**, **memcmp**, **memcpy**, **memmove**, **memset** – byte string operations

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<strings.h\>**

*int*\

**bcmp**(*const void \*s1*, *const void \*s2*, *size\_t n*);

*void*\

**bcopy**(*const void \*s1*, *void \*s2*, *size\_t n*);

*void*\

**bzero**(*void \*s*, *size\_t n*);

**#include \<string.h\>**

*void* *\**\

**memccpy**(*void \*restrict s1*, *const void \*restrict s2*, *int c*, *size\_t n*);

*void* *\**\

**memchr**(*const void \*s*, *int c*, *size\_t n*);

*int*\

**memcmp**(*const void \*s1*, *const void \*s2*, *size\_t n*);

*void* *\**\

**memcpy**(*void \*restrict s1*, *const void \*restrict s2*, *size\_t n*);

*void* *\**\

**memmove**(*void \*s1*, *const void \*s2*, *size\_t n*);

*void* *\**\

**memset**(*void \*s*, *int c*, *size\_t n*);

## DESCRIPTION

These functions operate on variable length strings of bytes. They do not check for terminating null bytes, as the routines listed in [string(3)](/string/3.md) do.

See the specific manual pages for more information.

## LEGACY SYNOPSIS

**#include \<string.h\>**

The include file ⟨string.h⟩ is necessary and sufficient for all functions.

## SEE ALSO

[bcmp(3)](/bcmp/3.md), [bcopy(3)](/bcopy/3.md), [bzero(3)](/bzero/3.md), [memccpy(3)](/memccpy/3.md), [memchr(3)](/memchr/3.md), [memcmp(3)](/memcmp/3.md), [memcpy(3)](/memcpy/3.md), [memmove(3)](/memmove/3.md), [memset(3)](/memset/3.md), [compat(5)](/compat/5.md)

## STANDARDS

The functions **memchr**(), **memcmp**(), **memcpy**(), **memmove**(), and **memset**() conform to ISO/IEC 9899:1990 (“ISO C90”).

## HISTORY

The functions **bzero**() and **memccpy**() appeared in 4.3BSD; the functions **bcmp**(), **bcopy**(), appeared in 4.2BSD.
