StrPushBackZstr
- Macro
- August 22, 2025
Table of Contents
StrPushBackZstr
StrPushBackZstr
Description
Push a null-terminated string to the back of string.
Parameters
Name | Direction | Description |
---|---|---|
str | in,out | Str to insert array chars into. |
zstr | in | Null-terminated string to be appended. |
Success
str
Failure
NULL
Usage example (Cross-references)
- In
Io.c:675
:
char c2 = low < 10 ? '0' + low : is_caps ? 'A' + (low - 10) : 'a' + (low - 10);
StrPushBackZstr(o, "\\x");
StrPushBack(o, c1);
StrPushBack(o, c2);
- In
Io.c:700
:
}
} else {
StrPushBackZstr(o, "\\x");
u8 c = *vs;
u8 low = c & 0xf;
- In
Io.c:803
:
StrPushFront(&hex, '0');
}
StrPushBackZstr(o, "0x");
StrMerge(o, &hex);
StrDeinit(&hex);
- In
Io.c:828
:
} else {
const char* digits = "0123456789abcdef";
StrPushBackZstr(o, "\\x");
StrPushBack(o, digits[c >> 4]);
StrPushBack(o, digits[c & 0xf]);
- In
Io.c:873
:
StrPushFront(&hex, '0');
}
StrPushBackZstr(o, "0x");
StrMerge(o, &hex);
StrDeinit(&hex);
- In
Io.c:901
:
} else {
const char* digits = "0123456789abcdef";
StrPushBackZstr(o, "\\x");
StrPushBack(o, digits[xs[i] >> 4]);
StrPushBack(o, digits[xs[i] & 0xf]);
- In
Io.c:1123
:
// Direct string append for NaN
if (fmt_info->flags & FMT_FLAG_CAPS) {
StrPushBackZstr(o, "NAN");
} else {
StrPushBackZstr(o, "nan");
- In
Io.c:1125
:
StrPushBackZstr(o, "NAN");
} else {
StrPushBackZstr(o, "nan");
}
} else if (isinf(*v)) {
- In
Io.c:1134
:
if (fmt_info->flags & FMT_FLAG_CAPS) {
StrPushBackZstr(o, "INF");
} else {
StrPushBackZstr(o, "inf");
- In
Io.c:1136
:
StrPushBackZstr(o, "INF");
} else {
StrPushBackZstr(o, "inf");
}
} else {
- In
Io.c:2246
:
// Format as hexadecimal
if (bv->length == 0) {
StrPushBackZstr(o, "0x0");
} else {
// Convert to integer (up to 64 bits) and format as hex
- In
Io.c:2256
:
// Format as octal
if (bv->length == 0) {
StrPushBackZstr(o, "0o0");
} else {
u64 value = BitVecToInteger(bv);
- In
Str.Memory.c:27
:
// Add some data
StrPushBackZstr(&s, "Hello");
// Original capacity should be at least 100
- In
Str.Insert.c:156
:
// Test StrPushBackZstr function
bool test_str_push_back_zstr(void) {
printf("Testing StrPushBackZstr\n");
Str s = StrInitFromZstr("Hello");
- In
Str.Insert.c:161
:
// Push a string at the back
StrPushBackZstr(&s, " World");
// Check that the string was inserted correctly
- In
Str.Init.c:138
:
StrInitStack(stack_str, 20, {
// Inside the scope where the stack string is valid
StrPushBackZstr(&stack_str, "Hello, Stack!");
// Validate the string