StrPushZstr

Table of Contents

StrPushZstr

Description

Push a null-terminated string to this string at given position.

Parameters

NameDirectionDescription
strin,outStr to insert array chars into.
zstrinNull-terminated string to be appended.
posinPosition to insert at.

Success

str

Failure

NULL

Usage example (Cross-references)

    // Test StrPushZstr function
    bool test_str_push_zstr(void) {
    printf("Testing StrPushZstr\n");
    
    Str s = StrInitFromZstr("Hello");
    
    // Push a string at position 2
    StrPushZstr(&s, " World", 2);
    
    // Check that the string was inserted correctly

Share :