mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Add VVV_fillstring()
This function is simple - it takes a given buffer and its size, fills it with a certain character, and null-terminates it. It's meant to be used with freshly-created buffers, so we don't copy-paste code.
This commit is contained in:
@@ -28,6 +28,12 @@ bool is_positive_num(const char* str, const bool hex);
|
||||
|
||||
bool endsWith(const char* str, const char* suffix);
|
||||
|
||||
void VVV_fillstring(
|
||||
char* buffer,
|
||||
const size_t buffer_size,
|
||||
const char fillchar
|
||||
);
|
||||
|
||||
#define INBOUNDS_VEC(index, vector) ((int) index >= 0 && (int) index < (int) vector.size())
|
||||
#define INBOUNDS_ARR(index, array) ((int) index >= 0 && (int) index < (int) SDL_arraysize(array))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user