StrPushBackCstr
- Macro
- August 22, 2025
Table of Contents
StrPushBackCstr
StrPushBackCstr
Description
Push an array of chars with given length to the back of this string.
Parameters
Name | Direction | Description |
---|---|---|
str | in,out | Str to insert array chars into. |
cstr | in | array of characters with given length to be inserted. |
Success
str
Failure
NULL
Usage example (Cross-references)
- In
Insert.h:114
:
/// FAILURE : NULL
///
#define StrPushBackZstr(str, zstr) StrPushBackCstr((str), (zstr), strlen((zstr)))
///
- In
Io.c:707
:
char c2 = low < 10 ? '0' + low : is_caps ? 'A' + (low - 10) : 'a' + (low - 10);
char cs[3] = {'\\', c1, c2};
StrPushBackCstr(o, cs, 3);
}
vs++;
- In
Str.Insert.c:140
:
// Test StrPushBackCstr function
bool test_str_push_back_cstr(void) {
printf("Testing StrPushBackCstr\n");
Str s = StrInitFromZstr("Hello");
- In
Str.Insert.c:145
:
// Push a string at the back
StrPushBackCstr(&s, " World", 6);
// Check that the string was inserted correctly