memset(3)

memset3

Fill a byte string with a byte value

Usage

#include <string.h>

void *

memset(void *b, int c, size_t len);

Library

Standard C Library (libc, -lc)

Overview

The memset() function writes len bytes of value c (converted to an unsigned char) to the string b.

Return values

The memset() function returns its first argument.

Releases

163 releases since Mac OS X 10.0; the text changed 5 times.

  1. 10.0–10.1.5
  2. 10.2–10.4.11
  3. 10.5–10.5.8
  4. 10.6–10.6.8
  5. 10.7–10.8.5
  6. 10.9–26.5

Standards

The memset() function conforms to ISO/IEC 9899:1990 (“ISO C90”).

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.