StrPushBackCstr
- Macro
- October 8, 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
Io.c:767
:
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
Proc.c:451
:
ssize_t n = read(rfd, tmpbuf, 1023);
if (n > 0) {
StrPushBackCstr(buf, tmpbuf, n);
total_read += n;
} else if (n == 0) {
- In
Proc.c:498
:
}
StrPushBackCstr(buf, tmpbuf, bytes_read);
total_read += bytes_read;
}
- In
Str.Insert.c:140
:
// Test StrPushBackCstr function
bool test_str_push_back_cstr(void) {
WriteFmt("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
- In
Insert.h:114
:
/// FAILURE : NULL
///
#define StrPushBackZstr(str, zstr) StrPushBackCstr((str), (zstr), strlen((zstr)))
///
- In
Str.c:322
:
char *cstr = generate_cstring(data, offset, size, 20);
if (cstr) {
StrPushBackCstr(str, cstr, strlen(cstr));
free(cstr);
}
- In
Str.c:433
:
char *cstr = generate_cstring(data, offset, size, 20);
if (cstr) {
StrPushBackCstr(str, cstr, strlen(cstr));
free(cstr);
}