Rudiments

bytestring.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_BYTESTRING_H
5 #define RUDIMENTS_BYTESTRING_H
6
7 #include <rudiments/private/bytestringincludes.h>
8
15 class RUDIMENTS_DLLSPEC bytestring {
16 public:
17
21 static void *duplicate(const void *src, size_t size);
22
26 static void *copy(void *dest, const void *src,
27 size_t size);
28
32 static void *copyWithOverlap(void *dest,
33 const void *src,
34 size_t size);
35
41 static void *copyUntil(void *dest, const void *src,
42 unsigned char character,
43 size_t size);
44
51 static void *copySwapBytes(void *dest,
52 const void *src,
53 size_t size);
54
57 static void *set(void *dest, unsigned char character,
58 size_t size);
59
62 static void *zero(void *dest, size_t size);
63
68 static int32_t compare(const void *s1, const void *s2,
69 size_t size);
70
75 static void *findFirst(void *haystack,
76 unsigned char needle,
77 size_t size);
78
83 static void *findLast(void *haystack,
84 unsigned char needle,
85 size_t size);
86
91 static void *findFirst(void *haystack,
92 size_t haystacksize,
93 const void *needle,
94 size_t needleize);
95
100 static void *findLast(void *haystack,
101 size_t haystacksize,
102 const void *needle,
103 size_t needleize);
104
109 static const void *findFirst(const void *haystack,
110 unsigned char needle,
111 size_t size);
112
117 static const void *findLast(const void *haystack,
118 unsigned char needle,
119 size_t size);
120
125 static const void *findFirst(const void *haystack,
126 size_t haystacksize,
127 const void *needle,
128 size_t needlesize);
129
134 static const void *findLast(const void *haystack,
135 size_t haystacksize,
136 const void *needle,
137 size_t needlesize);
138 };
139
140 #endif
bytestring
Definition: bytestring.h:15
bytestring::findLast
static void * findLast(void *haystack, unsigned char needle, size_t size)
bytestring::findLast
static void * findLast(void *haystack, size_t haystacksize, const void *needle, size_t needleize)
bytestring::zero
static void * zero(void *dest, size_t size)
bytestring::compare
static int32_t compare(const void *s1, const void *s2, size_t size)
bytestring::findLast
static const void * findLast(const void *haystack, size_t haystacksize, const void *needle, size_t needlesize)
bytestring::findFirst
static void * findFirst(void *haystack, size_t haystacksize, const void *needle, size_t needleize)
bytestring::copyWithOverlap
static void * copyWithOverlap(void *dest, const void *src, size_t size)
bytestring::copyUntil
static void * copyUntil(void *dest, const void *src, unsigned char character, size_t size)
bytestring::duplicate
static void * duplicate(const void *src, size_t size)
bytestring::findFirst
static const void * findFirst(const void *haystack, size_t haystacksize, const void *needle, size_t needlesize)
bytestring::copySwapBytes
static void * copySwapBytes(void *dest, const void *src, size_t size)
bytestring::findFirst
static const void * findFirst(const void *haystack, unsigned char needle, size_t size)
bytestring::findFirst
static void * findFirst(void *haystack, unsigned char needle, size_t size)
bytestring::copy
static void * copy(void *dest, const void *src, size_t size)
bytestring::findLast
static const void * findLast(const void *haystack, unsigned char needle, size_t size)
bytestring::set
static void * set(void *dest, unsigned char character, size_t size)
character
Definition: character.h:11