Strings
This page contains documentation about string types, including the hashing functions native to blib.
String
typedef struct _MeasuredBuffer {
DWORD length;
char* buffer;
} String, MeasuredBuffer;
Initialisers
String* vallocString(PBYTE text)
This function creates a deepcopy of `text` and does not free the original buffer.
Uses valloc
to allocate String
.
String* hallocString(PBYTE text)
This function creates a deepcopy of `text` and does not free the original buffer.
Uses halloc
to allocate a String
.
Methods
unsigned int rapidncmp (String source, unsigned int n, String* samples)
Compares a String
source
against an array of String
. Returns the index of the matching String
, or -1 if none are found.
unsigned int rapidstrcmp (String s1, String s2)
Compares two String
s, s1
and s2
. Returns 0
if both strings are the same, or the first index if they differ. Returns -1
if the strings are not of the same length.
Generic char*
Functions
Methods
unsigned int bstrlen(PBYTE string)
This function is unsafe and may result in accessing illegal memory if there are no gaurd null-bytes.
Returns the index of the first nullbyte.