#include <stddef.h>
Go to the source code of this file.
|
void * | memset (void *ptr, int c, size_t size) |
| Sets first bytes of memory pointed to specified value.
|
|
void * | memcpy (void *dstptr, const void *srcptr, size_t size) |
| Copies memory from one place to another.
|
|
int | memcmp (void *ptr1, void *ptr2, size_t len) |
| Compares the first num bytes of the block of memory pointed by ptr1 to the first num bytes pointed by ptr2.
|
|
◆ memcmp()
int memcmp |
( |
void * |
ptr1, |
|
|
void * |
ptr2, |
|
|
size_t |
len |
|
) |
| |
Compares the first num bytes of the block of memory pointed by ptr1 to the first num bytes pointed by ptr2.
- Parameters
-
ptr1 | Pointer to block of memory |
ptr2 | Pointer to block of memory |
len | Number of bytes to compare |
- Returns
- int
- 0 if matches,
- -1 the first byte that does not match in both memory blocks has a lower value in ptr1 than in ptr2,
- 1 the first byte that does not match in both memory blocks has a greater value in ptr1 than in ptr2
◆ memcpy()
void * memcpy |
( |
void * |
dstptr, |
|
|
const void * |
srcptr, |
|
|
size_t |
size |
|
) |
| |
Copies memory from one place to another.
- Parameters
-
dstptr | Destination pointer |
srcptr | Source pointer |
size | Length of copied memory |
- Returns
- void* Destination pointer
◆ memset()
void * memset |
( |
void * |
ptr, |
|
|
int |
c, |
|
|
size_t |
size |
|
) |
| |
Sets first bytes of memory pointed to specified value.
- Parameters
-
ptr | Pointer to the block of memory to fill |
c | Value to be set |
size | Number of bytes to set |
- Returns
- void* Pointer to the block of memory