StrInsertZstr

Table of Contents

StrInsertZstr

Description

Insert a zero-terminated string into given Str at given index.

Parameters

NameDirectionDescription
strin,outStr object to insert into.
zstrinZero-terminated string to be inserted.
idxinIndex to insert the string at.

Success

return

Failure

Does not return

Usage example (Cross-references)

    // Test StrInsertZstr function
    bool test_str_insert_zstr(void) {
    printf("Testing StrInsertZstr\n");
    
    Str s = StrInitFromZstr("Hello");
    
    // Insert a string in the middle
    StrInsertZstr(&s, " World", 2);
    
    // Check that the string was inserted correctly

Share :