Loading...
Searching...
No Matches
strings.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 Otto-von-Guericke-Universität Magdeburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for more
6 * details.
7 */
8
23#include <string.h>
24
25#ifndef STRINGS_H
26#define STRINGS_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
38static inline void bzero(void *dest, size_t n_bytes)
39{
40 memset(dest, 0, n_bytes);
41}
42
54static inline int bcmp(const void *s1, const void *s2, size_t n)
55{
56 return memcmp(s1, s2, n);
57}
58
72static inline void bcopy(const void *src, void *dest, size_t n)
73{
74 memmove(dest, src, n);
75}
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif /* STRINGS_H */
static void bcopy(const void *src, void *dest, size_t n)
Same as memmove(), use memmove() or memcpy() instead.
Definition strings.h:72
static int bcmp(const void *s1, const void *s2, size_t n)
Same as memcmp(), use memcmp instead.
Definition strings.h:54
static void bzero(void *dest, size_t n_bytes)
Same as memset(dest, 0, n_bytes), use memset() instead.
Definition strings.h:38