StrPushZstr
- Macro
- August 22, 2025
Table of Contents
StrPushZstr
StrPushZstr
Description
Push a null-terminated string to this string at given position.
Parameters
Name | Direction | Description |
---|---|---|
str | in,out | Str to insert array chars into. |
zstr | in | Null-terminated string to be appended. |
pos | in | Position to insert at. |
Success
str
Failure
NULL
Usage example (Cross-references)
- In
Str.Insert.c:124
:
// Test StrPushZstr function
bool test_str_push_zstr(void) {
printf("Testing StrPushZstr\n");
Str s = StrInitFromZstr("Hello");
- In
Str.Insert.c:129
:
// Push a string at position 2
StrPushZstr(&s, " World", 2);
// Check that the string was inserted correctly