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 
9 #pragma once
10 
25 #include <string.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
37 static inline void bzero(void *dest, size_t n_bytes)
38 {
39  memset(dest, 0, n_bytes);
40 }
41 
53 static inline int bcmp(const void *s1, const void *s2, size_t n)
54 {
55  return memcmp(s1, s2, n);
56 }
57 
71 static inline void bcopy(const void *src, void *dest, size_t n)
72 {
73  memmove(dest, src, n);
74 }
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
static void bcopy(const void *src, void *dest, size_t n)
Same as memmove(), use memmove() or memcpy() instead.
Definition: strings.h:71
static int bcmp(const void *s1, const void *s2, size_t n)
Same as memcmp(), use memcmp instead.
Definition: strings.h:53
static void bzero(void *dest, size_t n_bytes)
Same as memset(dest, 0, n_bytes), use memset() instead.
Definition: strings.h:37