ZstrInitClone
- Function
- October 8, 2025
Table of Contents
ZstrInitClone
ZstrInitClone
Description
Init clone method for zero-terminated strings.
Note
This is meant to be used as init method with Zstrs
vector which is basically a typedef of Vec(const char*)
.
Parameters
Name | Direction | Description |
---|---|---|
dst | out | Pointer to zero-terminated string to store cloned string pointer into. |
src | in | Pointer to zero-terminated string to make clone of. |
Success
Returns true
Failure
May abort with a log message or may return false depending on severity of situation.
Usage example (Cross-references)
- In
Memory.c:143
:
}
bool ZstrInitClone(const char **dst, const char **src) {
if (!dst || !src || !*src) {
LOG_FATAL("Invalid arguments.");