---
name: "bstring"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
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 \<string.h\>**

*int*\

**bcmp**(*const void \*b1*, *const void \*b2*, *size\_t len*);

*void*\

**bcopy**(*const void \*src*, *void \*dst*, *size\_t len*);

*void*\

**bzero**(*void \*b*, *size\_t len*);

*QVoid \**\

**memchr**(*QVoid \*b*, *int c*, *size\_t len*);

*int*\

**memcmp**(*const void \*b1*, *const void \*b2*, *size\_t len*);

*void* *\**\

**memccpy**(*void \* restrict dst*, *const void \* restrict src*, *int c*, *size\_t len*);

*void* *\**\

**memcpy**(*void \*dst*, *const void \*src*, *size\_t len*);

*void* *\**\

**memmove**(*void \*dst*, *const void \*src*, *size\_t len*);

*void* *\**\

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

## 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.

## 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)

## STANDARDS

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

The **memchr**() function conforms to ISO/IEC 9899:2024 (“ISO C23”), where it is specified as a qualifier-preserving function.

## HISTORY

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