ZstrInitClone

Table of Contents

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

NameDirectionDescription
dstoutPointer to zero-terminated string to store cloned string pointer into.
srcinPointer 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)

    }
    
    bool ZstrInitClone(const char **dst, const char **src) {
    if (!dst || !src || !*src) {
    LOG_FATAL("Invalid arguments.");

Share :