This header contains functions related to analyzing, modifying or copying buffers interpreted as bytes.
More...
#include <fennec/lang/type_traits.h>
#include <fennec/memory/detail/_string.h>
Go to the source code of this file.
- Author
- Medusa Slockbower
- Copyright
- Copyright © 2025 Medusa Slockbower (GPLv3)
◆ addressof()
template<typename TypeT >
| constexpr TypeT * fennec::addressof |
( |
TypeT & |
obj | ) |
|
|
constexpr |
- Template Parameters
-
| TypeT | The type of the objects |
- Parameters
-
| obj | The object to find the address of |
- Returns
- The true address of the
◆ memcmp_s()
| constexpr int fennec::memcmp_s |
( |
const void * |
lhs, |
|
|
size_t |
n0, |
|
|
const void * |
rhs, |
|
|
size_t |
n1 |
|
) |
| |
|
constexpr |
- Parameters
-
| lhs | The first object, interpreted as an array of bytes |
| rhs | The second object, interpreted as an array of bytes |
| n0 | The size, in bytes, of lhs |
| n1 | The size, in bytes, of rhs |
- Returns
- \(0\) if the first \(min(n0, n1)\) bytes of \(lhs\) and \(rhs\) are equivalent. Otherwise, returns \(1\) for the first byte \(b\) where \(lhs[b] > \) rhs[b] \(, and \)-1 \( for \)
◆ memcpy_s()
| constexpr void * fennec::memcpy_s |
( |
void * |
dst, |
|
|
size_t |
n0, |
|
|
const void * |
src, |
|
|
size_t |
n1 |
|
) |
| |
|
constexpr |
- Parameters
-
| dst | The destination object, interpreted as an array of bytes |
| src | The source object, interpreted as an array of bytes |
| n0 | The size, in bytes, of dst |
| n1 | The size, in bytes, of src |
- Returns
- \(dst\)
◆ memmove_s()
| constexpr void * fennec::memmove_s |
( |
void * |
dst, |
|
|
size_t |
n0, |
|
|
const void * |
src, |
|
|
size_t |
n1 |
|
) |
| |
|
constexpr |
- Parameters
-
| dst | The destination object, interpreted as an array of bytes |
| src | The source object, interpreted as an array of bytes |
| n0 | The size, in bytes, of dst |
| n1 | The size, in bytes, of src |
- Returns
- \(dst\)