StrInsertZstr
- Macro
- August 22, 2025
Table of Contents
StrInsertZstr
StrInsertZstr
Description
Insert a zero-terminated string into given Str at given index.
Parameters
Name | Direction | Description |
---|---|---|
str | in,out | Str object to insert into. |
zstr | in | Zero-terminated string to be inserted. |
idx | in | Index to insert the string at. |
Success
return
Failure
Does not return
Usage example (Cross-references)
- In
Str.Insert.c:74
:
// Test StrInsertZstr function
bool test_str_insert_zstr(void) {
printf("Testing StrInsertZstr\n");
Str s = StrInitFromZstr("Hello");
- In
Str.Insert.c:79
:
// Insert a string in the middle
StrInsertZstr(&s, " World", 2);
// Check that the string was inserted correctly