StrPushBackR
Description
R-form sibling of StrPushBackL: appends a single character by copy. The source is not modified. Accepts any value implicitly convertible to char (in particular, int character literals like 'x').
Success
Returns true; the character is appended at the tail.
Failure
Returns false on allocation failure. str unchanged.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Proc.h:367:
Str UNPL(buf) = StrInit(); \
StrAppendFmt(&UNPL(buf), __VA_ARGS__); \
StrPushBackR(&UNPL(buf), '\n'); \
ProcWriteToStdin((p), &UNPL(buf)); \
StrDeinit(&UNPL(buf)); \
- In
JSON.h:715:
bool ___is_first___ = true; \
(void)___is_first___; \
StrPushBackR(&(j), '{'); \
{writer}; \
StrPushBackR(&(j), '}'); \
- In
JSON.h:717:
StrPushBackR(&(j), '{'); \
{writer}; \
StrPushBackR(&(j), '}'); \
} while (0)- In
JSON.h:743:
___is_first___ = false; \
} else { \
StrPushBackR(&(j), ','); \
} \
StrAppendFmt(&(j), "\"{}\":", (Zstr)(k)); \
- In
JSON.h:772:
bool ___is_first___ = true; \
(void)___is_first___; \
StrPushBackR(&(j), '['); \
VecForeach(&(arr), item) { \
if (___is_first___) { \
- In
JSON.h:777:
___is_first___ = false; \
} else { \
StrPushBackR(&(j), ','); \
} \
{ writer } \
- In
JSON.h:781:
{ writer } \
} \
StrPushBackR(&(j), ']'); \
} while (0)- In
JSON.h:809:
___is_first___ = false; \
} else { \
StrPushBackR(&(j), ','); \
} \
StrAppendFmt(&(j), "\"{}\":", (Zstr)(k)); \
- In
JSON.h:855:
___is_first___ = false; \
} else { \
StrPushBackR(&(j), ','); \
} \
StrAppendFmt(&(j), "\"{}\":", (Zstr)(k)); \
- In
JSON.h:901:
___is_first___ = false; \
} else { \
StrPushBackR(&(j), ','); \
} \
StrAppendFmt(&(j), "\"{}\":", (Zstr)(k)); \
- In
JSON.h:948:
___is_first___ = false; \
} else { \
StrPushBackR(&(j), ','); \
} \
StrAppendFmt(&(j), "\"{}\":", (Zstr)(k)); \
- In
JSON.h:993:
___is_first___ = false; \
} else { \
StrPushBackR(&(j), ','); \
} \
StrAppendFmt(&(j), "\"{}\":", (Zstr)(k)); \
- In
ArgParse.c:281:
if (c >= 'a' && c <= 'z')
c = (char)(c - 'a' + 'A');
StrPushBackR(out, c);
}
}- In
ArgParse.c:291:
StrPushBackMany(out, " ");
if (sp->role == ARG_ROLE_POSITIONAL) {
StrPushBackR(out, '<');
StrPushBackMany(out, sp->long_name);
StrPushBackR(out, '>');- In
ArgParse.c:293:
StrPushBackR(out, '<');
StrPushBackMany(out, sp->long_name);
StrPushBackR(out, '>');
} else {
if (sp->short_name) {- In
ArgParse.c:305:
StrPushBackMany(out, sp->long_name);
if (sp->role == ARG_ROLE_REQUIRED || sp->role == ARG_ROLE_OPTIONAL) {
StrPushBackR(out, ' ');
StrPushBackR(out, '<');
append_metavar(out, sp);- In
ArgParse.c:306:
if (sp->role == ARG_ROLE_REQUIRED || sp->role == ARG_ROLE_OPTIONAL) {
StrPushBackR(out, ' ');
StrPushBackR(out, '<');
append_metavar(out, sp);
StrPushBackR(out, '>');- In
ArgParse.c:308:
StrPushBackR(out, '<');
append_metavar(out, sp);
StrPushBackR(out, '>');
}
}- In
ArgParse.c:343:
if (sp->role != ARG_ROLE_REQUIRED)
continue;
StrPushBackR(&usage, ' ');
if (sp->long_name)
StrPushBackMany(&usage, sp->long_name);- In
ArgParse.c:350:
StrPushBackMany(&usage, " <");
append_metavar(&usage, sp);
StrPushBackR(&usage, '>');
}
VecForeachPtr(&self->specs, sp) {- In
ArgParse.c:357:
StrPushBackMany(&usage, " <");
StrPushBackMany(&usage, sp->long_name);
StrPushBackR(&usage, '>');
}- In
Io.c:270:
} else if (align == ALIGN_LEFT) {
for (size i = 0; i < pad_len; i++) {
if (!StrPushBackR(o, ' ')) {
return false;
}- In
Io.c:284:
}
for (size i = 0; i < right_pad; i++) {
if (!StrPushBackR(o, ' ')) {
return false;
}- In
Io.c:308:
// `{{` is the escape for a literal '{'.
if (i + 1 < fmt_len && fmt[i + 1] == '{') {
if (!StrPushBackR(o, '{')) {
return false;
}- In
Io.c:457:
// `}}` escapes to a single literal '}'.
if (i + 1 < fmt_len && fmt[i + 1] == '}') {
if (!StrPushBackR(o, '}')) {
return false;
}- In
Io.c:466:
return false;
} else {
if (!StrPushBackR(o, fmt[i])) {
return false;
}- In
Io.c:540:
// each other's output.
if (ok && append_newline) {
StrPushBackR(&out, '\n');
}- In
Io.c:1028:
if (fc != '{') {
// Literal byte: emit verbatim (mirrors the read side's match).
if (!StrPushBackR(out, fc)) {
return false;
}- In
Io.c:1038:
char esc = 0;
if (StrIterPeek(&fsi, &esc) && esc == '{') {
if (!StrPushBackR(out, '{')) {
return false;
}- In
Io.c:1147:
char buf_byte = 0;
while (FileRead(file, &buf_byte, 1) == 1) {
StrPushBackR(&buffer, buf_byte);
}
str_read_fmt(StrBegin(&buffer), fmtstr, argv, argc);- In
Io.c:1212:
// 'c' leaves it clear so source bytes pass through untouched.
if (force_case) {
if (!StrPushBackR(o, is_caps ? TO_UPPER(byte) : TO_LOWER(byte))) {
return false;
}- In
Io.c:1216:
}
} else {
if (!StrPushBackR(o, byte)) {
return false;
}- In
Io.c:1228:
char c2 = low < 10 ? '0' + low : is_caps ? 'A' + (low - 10) : 'a' + (low - 10);
if (!StrPushBackMany(o, "\\x") || !StrPushBackR(o, c1) || !StrPushBackR(o, c2)) {
return false;
}- In
Io.c:1249:
// See `write_int_as_chars` for the force_case / 'c' split.
if (force_case) {
if (!StrPushBackR(o, is_caps ? TO_UPPER(*vs) : TO_LOWER(*vs))) {
return false;
}- In
Io.c:1253:
}
} else {
if (!StrPushBackR(o, *vs)) {
return false;
}- In
Io.c:1265:
char c1 = hiw < 10 ? '0' + hiw : is_caps ? 'A' + (hiw - 10) : 'a' + (hiw - 10);
char c2 = low < 10 ? '0' + low : is_caps ? 'A' + (low - 10) : 'a' + (low - 10);
if (!StrPushBackMany(o, "\\x") || !StrPushBackR(o, c1) || !StrPushBackR(o, c2)) {
return false;
}- In
Io.c:1339:
}
if (!StrPushBackR(out, uppercase ? 'E' : 'e') || !StrPushBackR(out, sign)) {
ok = false;
break;- In
Io.c:1345:
if (digit_count < 2) {
if (!StrPushBackR(out, '0')) {
ok = false;
break;- In
Io.c:1352:
while (digit_count > 0) {
if (!StrPushBackR(out, data[--digit_count])) {
ok = false;
break;- In
Io.c:1390:
if (StrBegin(&canonical)[0] == '-') {
if (!StrPushBackR(&result, '-')) {
goto fail;
}- In
Io.c:1403:
if (precision > 0) {
if (!StrPushBackR(&result, '.')) {
goto fail;
}- In
Io.c:1407:
}
for (u32 i = 0; i < precision; i++) {
if (!StrPushBackR(&result, '0')) {
goto fail;
}- In
Io.c:1425:
}
if (precision > 0) {
if (!StrPushBackR(&result, '.')) {
goto fail;
}- In
Io.c:1432:
}
for (u32 i = (u32)MIN2(frac, (u64)precision); i < precision; i++) {
if (!StrPushBackR(&result, '0')) {
goto fail;
}- In
Io.c:1476:
if (FloatIsZero(value)) {
if (value->negative) {
if (!StrPushBackR(&result, '-')) {
goto fail;
}- In
Io.c:1480:
}
}
if (!StrPushBackR(&result, '0')) {
goto fail;
}- In
Io.c:1484:
}
if (has_precision && precision > 0) {
if (!StrPushBackR(&result, '.')) {
goto fail;
}- In
Io.c:1488:
}
for (u32 i = 0; i < precision; i++) {
if (!StrPushBackR(&result, '0')) {
goto fail;
}- In
Io.c:1502:
if (value->negative) {
if (!StrPushBackR(&result, '-')) {
goto fail;
}- In
Io.c:1508:
exponent = value->exponent + (i64)StrLen(&digits) - 1;
if (!StrPushBackR(&result, StrBegin(&digits)[0])) {
goto fail;
}- In
Io.c:1514:
frac_digits = has_precision ? precision : (StrLen(&digits) > 0 ? StrLen(&digits) - 1 : 0);
if (frac_digits > 0) {
if (!StrPushBackR(&result, '.')) {
goto fail;
}- In
Io.c:1519:
for (u64 i = 0; i < frac_digits; i++) {
if (i + 1 < StrLen(&digits)) {
if (!StrPushBackR(&result, StrBegin(&digits)[i + 1])) {
goto fail;
}- In
Io.c:1523:
}
} else {
if (!StrPushBackR(&result, '0')) {
goto fail;
}- In
Io.c:1775:
StrForeachIdx(s, c, i) {
if (i > 0) {
if (!StrPushBackR(o, ' ')) {
return false;
}- In
Io.c:1817:
StrForeachInRange(s, c, 0, len) {
if (IS_PRINTABLE(c)) {
if (!StrPushBackR(o, c)) {
return false;
}- In
Io.c:1822:
} else {
Zstr digits = "0123456789abcdef";
if (!StrPushBackMany(o, "\\x") || !StrPushBackR(o, digits[(c >> 4) & 0xf]) ||
!StrPushBackR(o, digits[c & 0xf])) {
return false;- In
Io.c:1823:
Zstr digits = "0123456789abcdef";
if (!StrPushBackMany(o, "\\x") || !StrPushBackR(o, digits[(c >> 4) & 0xf]) ||
!StrPushBackR(o, digits[c & 0xf])) {
return false;
}- In
Io.c:1863:
while (xs[i]) {
if (i > 0) {
if (!StrPushBackR(o, ' ')) {
return false;
}- In
Io.c:1904:
for (size i = 0; i < len; i++) {
if (IS_PRINTABLE(xs[i])) {
if (!StrPushBackR(o, xs[i])) {
return false;
}- In
Io.c:1909:
} else {
Zstr digits = "0123456789abcdef";
if (!StrPushBackMany(o, "\\x") || !StrPushBackR(o, digits[(xs[i] >> 4) & 0xf]) ||
!StrPushBackR(o, digits[xs[i] & 0xf])) {
return false;- In
Io.c:1910:
Zstr digits = "0123456789abcdef";
if (!StrPushBackMany(o, "\\x") || !StrPushBackR(o, digits[(xs[i] >> 4) & 0xf]) ||
!StrPushBackR(o, digits[xs[i] & 0xf])) {
return false;
}- In
Io.c:2171:
} else if (F64IsInf(*v)) {
if (*v < 0) {
if (!StrPushBackR(o, '-')) {
return false;
}- In
Io.c:2411:
}
StrPushBackR(s, c);
} else if (*i == quote) {
i++;- In
Io.c:2424:
}
StrPushBackR(s, c);
}
} else {- In
Io.c:2447:
}
StrPushBackR(s, c);
} else {
char c = *i++;- In
Io.c:2456:
}
StrPushBackR(s, c);
}
}- In
Io.c:3588:
}
return StrPushBackR(o, *v);
}- In
Io.c:3604:
switch (fmt_info->endian) {
case ENDIAN_BIG : {
return StrPushBackR(o, ((x >> 8) & 0xff)) && StrPushBackR(o, (x & 0xff));
}
case ENDIAN_LITTLE : {- In
Io.c:3607:
}
case ENDIAN_LITTLE : {
return StrPushBackR(o, (x & 0xff)) && StrPushBackR(o, ((x >> 8) & 0xff));
}
case ENDIAN_NATIVE :- In
Io.c:3630:
switch (fmt_info->endian) {
case ENDIAN_BIG : {
return StrPushBackR(o, ((x >> 24) & 0xff)) && StrPushBackR(o, (x >> 16) & 0xff) &&
StrPushBackR(o, (x >> 8) & 0xff) && StrPushBackR(o, (x & 0xff));
}- In
Io.c:3631:
case ENDIAN_BIG : {
return StrPushBackR(o, ((x >> 24) & 0xff)) && StrPushBackR(o, (x >> 16) & 0xff) &&
StrPushBackR(o, (x >> 8) & 0xff) && StrPushBackR(o, (x & 0xff));
}
case ENDIAN_LITTLE : {- In
Io.c:3634:
}
case ENDIAN_LITTLE : {
return StrPushBackR(o, (x & 0xff)) && StrPushBackR(o, (x >> 8) & 0xff) &&
StrPushBackR(o, (x >> 16) & 0xff) && StrPushBackR(o, ((x >> 24) & 0xff));
}- In
Io.c:3635:
case ENDIAN_LITTLE : {
return StrPushBackR(o, (x & 0xff)) && StrPushBackR(o, (x >> 8) & 0xff) &&
StrPushBackR(o, (x >> 16) & 0xff) && StrPushBackR(o, ((x >> 24) & 0xff));
}
case ENDIAN_NATIVE :- In
Io.c:3658:
switch (fmt_info->endian) {
case ENDIAN_BIG : {
return StrPushBackR(o, ((x >> 56) & 0xff)) && StrPushBackR(o, (x >> 48) & 0xff) &&
StrPushBackR(o, (x >> 40) & 0xff) && StrPushBackR(o, (x >> 32) & 0xff) &&
StrPushBackR(o, (x >> 24) & 0xff) && StrPushBackR(o, (x >> 16) & 0xff) &&- In
Io.c:3659:
case ENDIAN_BIG : {
return StrPushBackR(o, ((x >> 56) & 0xff)) && StrPushBackR(o, (x >> 48) & 0xff) &&
StrPushBackR(o, (x >> 40) & 0xff) && StrPushBackR(o, (x >> 32) & 0xff) &&
StrPushBackR(o, (x >> 24) & 0xff) && StrPushBackR(o, (x >> 16) & 0xff) &&
StrPushBackR(o, (x >> 8) & 0xff) && StrPushBackR(o, (x & 0xff));- In
Io.c:3660:
return StrPushBackR(o, ((x >> 56) & 0xff)) && StrPushBackR(o, (x >> 48) & 0xff) &&
StrPushBackR(o, (x >> 40) & 0xff) && StrPushBackR(o, (x >> 32) & 0xff) &&
StrPushBackR(o, (x >> 24) & 0xff) && StrPushBackR(o, (x >> 16) & 0xff) &&
StrPushBackR(o, (x >> 8) & 0xff) && StrPushBackR(o, (x & 0xff));
}- In
Io.c:3661:
StrPushBackR(o, (x >> 40) & 0xff) && StrPushBackR(o, (x >> 32) & 0xff) &&
StrPushBackR(o, (x >> 24) & 0xff) && StrPushBackR(o, (x >> 16) & 0xff) &&
StrPushBackR(o, (x >> 8) & 0xff) && StrPushBackR(o, (x & 0xff));
}
case ENDIAN_LITTLE : {- In
Io.c:3664:
}
case ENDIAN_LITTLE : {
return StrPushBackR(o, (x & 0xff)) && StrPushBackR(o, (x >> 8) & 0xff) &&
StrPushBackR(o, (x >> 16) & 0xff) && StrPushBackR(o, (x >> 24) & 0xff) &&
StrPushBackR(o, (x >> 32) & 0xff) && StrPushBackR(o, (x >> 40) & 0xff) &&- In
Io.c:3665:
case ENDIAN_LITTLE : {
return StrPushBackR(o, (x & 0xff)) && StrPushBackR(o, (x >> 8) & 0xff) &&
StrPushBackR(o, (x >> 16) & 0xff) && StrPushBackR(o, (x >> 24) & 0xff) &&
StrPushBackR(o, (x >> 32) & 0xff) && StrPushBackR(o, (x >> 40) & 0xff) &&
StrPushBackR(o, (x >> 48) & 0xff) && StrPushBackR(o, ((x >> 56) & 0xff));- In
Io.c:3666:
return StrPushBackR(o, (x & 0xff)) && StrPushBackR(o, (x >> 8) & 0xff) &&
StrPushBackR(o, (x >> 16) & 0xff) && StrPushBackR(o, (x >> 24) & 0xff) &&
StrPushBackR(o, (x >> 32) & 0xff) && StrPushBackR(o, (x >> 40) & 0xff) &&
StrPushBackR(o, (x >> 48) & 0xff) && StrPushBackR(o, ((x >> 56) & 0xff));
}- In
Io.c:3667:
StrPushBackR(o, (x >> 16) & 0xff) && StrPushBackR(o, (x >> 24) & 0xff) &&
StrPushBackR(o, (x >> 32) & 0xff) && StrPushBackR(o, (x >> 40) & 0xff) &&
StrPushBackR(o, (x >> 48) & 0xff) && StrPushBackR(o, ((x >> 56) & 0xff));
}
case ENDIAN_NATIVE :- In
Str.c:572:
if (config->use_prefix) {
if (!StrPushBackR(str, '0')) {
return NULL;
}- In
Str.c:576:
}
if (config->base == 2) {
if (!StrPushBackR(str, 'b')) {
return NULL;
}- In
Str.c:580:
}
} else if (config->base == 8) {
if (!StrPushBackR(str, 'o')) {
return NULL;
}- In
Str.c:584:
}
} else if (config->base == 16) {
if (!StrPushBackR(str, 'x')) {
return NULL;
}- In
Str.c:591:
if (value == 0) {
if (!StrPushBackR(str, '0')) {
return NULL;
}- In
Str.c:608:
// them in reverse so the destination ends up MSB-first.
while (pos > 0) {
if (!StrPushBackR(str, data[--pos])) {
ok = false;
break;- In
Str.c:677:
Zstr nan_str = config->uppercase ? "NAN" : "nan";
for (size i = 0; i < 3; i++) {
if (!StrPushBackR(str, nan_str[i])) {
return NULL;
}- In
Str.c:686:
if (isinf_f64(value)) {
if (value < 0) {
if (!StrPushBackR(str, '-')) {
return NULL;
}- In
Str.c:690:
}
} else if (config->always_sign) {
if (!StrPushBackR(str, '+')) {
return NULL;
}- In
Str.c:696:
Zstr inf_str = config->uppercase ? "INF" : "inf";
for (size i = 0; i < 3; i++) {
if (!StrPushBackR(str, inf_str[i])) {
return NULL;
}- In
Str.c:704:
if (value < 0) {
if (!StrPushBackR(str, '-')) {
return NULL;
}- In
Str.c:709:
value = -value;
} else if (config->always_sign) {
if (!StrPushBackR(str, '+')) {
return NULL;
}- In
Str.c:732:
i64 int_part = (i64)mantissa;
if (!StrPushBackR(str, '0' + int_part)) {
return NULL;
}- In
Str.c:737:
if (config->precision > 0) {
if (!StrPushBackR(str, '.')) {
return NULL;
}- In
Str.c:749:
if (digit >= 10)
digit = 9;
if (!StrPushBackR(str, '0' + digit)) {
return NULL;
}- In
Str.c:756:
}
if (!StrPushBackR(str, config->uppercase ? 'E' : 'e')) {
return NULL;
}- In
Str.c:760:
}
if (exp >= 0) {
if (!StrPushBackR(str, '+')) {
return NULL;
}- In
Str.c:764:
}
} else {
if (!StrPushBackR(str, '-')) {
return NULL;
}- In
Str.c:772:
if (exp == 0) {
// Two-digit minimum matches printf("%e") convention.
if (!StrPushBackR(str, '0') || !StrPushBackR(str, '0')) {
return NULL;
}- In
Str.c:789:
}
while (exp_pos > 0) {
if (!StrPushBackR(str, data[--exp_pos])) {
ok = false;
break;- In
Str.c:803:
if (int_part == 0) {
if (!StrPushBackR(str, '0')) {
return NULL;
}- In
Str.c:816:
}
while (int_pos > 0) {
if (!StrPushBackR(str, data[--int_pos])) {
ok = false;
break;- In
Str.c:828:
if (config->precision > 0) {
if (!StrPushBackR(str, '.')) {
return NULL;
}- In
Str.c:851:
}
if (!StrPushBackR(str, '0' + digit)) {
return NULL;
}- In
Int.c:763:
if (IntIsZero(value)) {
return StrPushBackR(out, '0');
}- In
Int.c:819:
// place value); the most significant chunk stops at its top digit.
for (u32 k = 0; (k < chunk_digits) && !(last && rem == 0 && k > 0); k++) {
if (!StrPushBackR(&result, int_radix_char((u8)(rem % radix), uppercase))) {
IntDeinit(&chunk_divisor);
IntDeinit("ient);- In
Float.c:515:
if (ch >= '0' && ch <= '9') {
if (!StrPushBackR(&digits, ch)) {
goto fail;
}- In
Float.c:648:
if (FloatIsZero(value)) {
return StrPushBackR(out, '0');
}- In
Float.c:658:
if (value->negative) {
if (!StrPushBackR(&result, '-')) {
goto fail;
}- In
Float.c:669:
for (i64 i = 0; i < value->exponent; i++) {
if (!StrPushBackR(&result, '0')) {
goto fail;
}- In
Float.c:678:
if (split > 0) {
for (i64 i = 0; i < split; i++) {
if (!StrPushBackR(&result, StrCharAt(&digits, i))) {
goto fail;
}- In
Float.c:683:
}
if (!StrPushBackR(&result, '.')) {
goto fail;
}- In
Float.c:688:
for (u64 i = (u64)split; i < StrLen(&digits); i++) {
if (!StrPushBackR(&result, StrCharAt(&digits, i))) {
goto fail;
}- In
Float.c:698:
for (i64 i = 0; i < -split; i++) {
if (!StrPushBackR(&result, '0')) {
goto fail;
}- In
BitVec.c:904:
for (u64 i = 0; i < bv->length; i++) {
char bit_char = BitVecGet(bv, i) ? '1' : '0';
if (!StrPushBackR(out, bit_char)) {
StrDeinit(out);
*out = StrInit(alloc); if (n == 0)
return;
StrPushBackR(out, hex[id[0] >> 4]);
StrPushBackR(out, hex[id[0] & 0xf]);
StrPushBackR(out, '/'); return;
StrPushBackR(out, hex[id[0] >> 4]);
StrPushBackR(out, hex[id[0] & 0xf]);
StrPushBackR(out, '/');
for (u32 i = 1; i < n; ++i) { StrPushBackR(out, hex[id[0] >> 4]);
StrPushBackR(out, hex[id[0] & 0xf]);
StrPushBackR(out, '/');
for (u32 i = 1; i < n; ++i) {
StrPushBackR(out, hex[id[i] >> 4]); StrPushBackR(out, '/');
for (u32 i = 1; i < n; ++i) {
StrPushBackR(out, hex[id[i] >> 4]);
StrPushBackR(out, hex[id[i] & 0xf]);
} for (u32 i = 1; i < n; ++i) {
StrPushBackR(out, hex[id[i] >> 4]);
StrPushBackR(out, hex[id[i] & 0xf]);
}
} StrResize(&path, 0);
sys_append_dirname(&path, main_path);
StrPushBackR(&path, '/');
StrPushBackMany(&path, main->debuglink_name);
if (sys_path_exists(StrBegin(&path)) && ElfOpen(out, &path, alloc)) { StrPushBackMany(&path, cand_prefix);
sys_append_dirname(&path, main_path);
StrPushBackR(&path, '/');
StrPushBackMany(&path, main->debuglink_name);
if (sys_path_exists(StrBegin(&path)) && ElfOpen(out, &path, alloc)) {- In
PdbCache.c:49:
sys_append_dirname(out_path, pe_path);
if (StrLen(out_path) > 0)
StrPushBackR(out_path, '/');
StrPushBackMany(out_path, pdb_base);
if (sys_path_exists(StrBegin(out_path)))- In
Dns.c:447:
c = (char)(c + ('a' - 'A'));
}
StrPushBackR(out, c);
}
}- In
Backtrace.c:256:
StrAppendFmt(out, " ({}:{})", fname, (u32)line.LineNumber);
}
StrPushBackR(out, '\n');
}- In
Backtrace.c:479:
}
}
StrPushBackR(out, '\n');
}- In
Proc.c:227:
StrPushBackMany(&cmdline, filepath);
for (char **arg = argv + 1; *arg; ++arg) {
StrPushBackR(&cmdline, ' ');
StrPushBackMany(&cmdline, *arg);
}- In
_Helpers.h:60:
u64 len = (u64)(last_sep - path);
for (u64 i = 0; i < len; ++i)
StrPushBackR(out, path[i]);
}- In
DwarfInfo.c:479:
u64 offset = StrLen(pool);
for (u64 i = 0; i < nlen; ++i) {
if (!StrPushBackR(pool, src[i]))
return false;
}- In
DwarfInfo.c:482:
return false;
}
if (!StrPushBackR(pool, '\0'))
return false;
PendingFn pf = {.low_pc = low_pc, .high_pc = hi, .name_offset_in_pool = offset};- In
Dns.c:159:
}
if (label_idx > 0) {
StrPushBackR(out_name, '.');
++name_len;
}- In
Dns.c:163:
}
for (u64 i = 0; i < label_len; ++i) {
StrPushBackR(out_name, (char)*IterDataAt(it, cur + 1 + i));
}
name_len += label_len;- In
KvConfig.c:121:
}
StrPushBackR(key, c);
StrIterMustNext(&si);
}- In
KvConfig.c:168:
switch (c) {
case 'n' :
StrPushBackR(value, '\n');
break;
case 'r' :- In
KvConfig.c:171:
break;
case 'r' :
StrPushBackR(value, '\r');
break;
case 't' :- In
KvConfig.c:174:
break;
case 't' :
StrPushBackR(value, '\t');
break;
default :- In
KvConfig.c:178:
default :
// Pass any other escaped character through verbatim.
StrPushBackR(value, c);
break;
}- In
KvConfig.c:186:
}
StrPushBackR(value, c);
StrIterMustNext(&si);
}- In
KvConfig.c:209:
}
StrPushBackR(value, c);
StrIterMustNext(&si);
}- In
Pdb.c:508:
if (!StrPushBackMany(pool, s))
return false;
return StrPushBackR(pool, '\0');
}- In
JSON.c:222:
// escape sequence
case '\\' :
StrPushBackR(str, '\\');
StrIterMustNext(&si);
break;- In
JSON.c:227:
case '"' :
StrPushBackR(str, '"');
StrIterMustNext(&si);
break;- In
JSON.c:232:
case '/' :
StrPushBackR(str, '/');
StrIterMustNext(&si);
break;- In
JSON.c:237:
case 'b' :
StrPushBackR(str, '\b');
StrIterMustNext(&si);
break;- In
JSON.c:242:
case 'f' :
StrPushBackR(str, '\f');
StrIterMustNext(&si);
break;- In
JSON.c:247:
case 'n' :
StrPushBackR(str, '\n');
StrIterMustNext(&si);
break;- In
JSON.c:252:
case 'r' :
StrPushBackR(str, '\r');
StrIterMustNext(&si);
break;- In
JSON.c:257:
case 't' :
StrPushBackR(str, '\t');
StrIterMustNext(&si);
break;- In
JSON.c:286:
// default allowed characters
default :
StrPushBackR(str, c);
StrIterMustNext(&si);
break;- In
JSON.c:337:
has_exp = true;
is_flt = true;
StrPushBackR(&ns, c);
StrIterMustNext(&si);
break;- In
JSON.c:349:
}
is_flt = true;
StrPushBackR(&ns, c);
StrIterMustNext(&si);
break;- In
JSON.c:363:
case '8' :
case '9' :
StrPushBackR(&ns, c);
StrIterMustNext(&si);
break;- In
JSON.c:389:
}
has_exp_plus_minus = true;
StrPushBackR(&ns, c);
StrIterMustNext(&si);
break;- In
Dwarf.c:57:
if (!StrPushBackMany(pool, s))
return false;
if (!StrPushBackR(pool, '\0'))
return false;
*out_offset = start; // Pattern "101" as a Str on a separate (untracked) allocator.
Str pattern = StrInit(pbase);
StrPushBackR(&pattern, '1');
StrPushBackR(&pattern, '0');
StrPushBackR(&pattern, '1'); Str pattern = StrInit(pbase);
StrPushBackR(&pattern, '1');
StrPushBackR(&pattern, '0');
StrPushBackR(&pattern, '1'); StrPushBackR(&pattern, '1');
StrPushBackR(&pattern, '0');
StrPushBackR(&pattern, '1');
bool matched = bitvec_regex_match_str(&bv, &pattern);- In
Write.c:1233:
Str s = StrInit(&alloc);
StrPushBackR(&s, (char)0x0F); // single byte 0x0F -> "f"
StrAppendFmt(&output, "{X}", s);- In
Write.c:1253:
Str s = StrInit(&alloc);
StrPushBackR(&s, (char)0x0F);
StrAppendFmt(&output, "{x}", s);- In
Write.c:1274:
Str s = StrInit(&alloc);
StrPushBackR(&s, (char)0x01);
StrPushBackR(&s, (char)0x02);- In
Write.c:1275:
Str s = StrInit(&alloc);
StrPushBackR(&s, (char)0x01);
StrPushBackR(&s, (char)0x02);
StrAppendFmt(&output, "{x}", s);- In
Write.c:1296:
Str s = StrInit(&alloc);
StrPushBackR(&s, (char)0x05);
StrAppendFmt(&output, "{x}", s);- In
Write.c:3966:
// 0x1A: hi nibble 0x01 (<10 -> '1'), low nibble 0x0A (>=10 -> 'a') => "\x1a".
Str src = StrInit(&alloc);
StrPushBackR(&src, 0x1A);
StrAppendFmt(&out, "{c}", src);
ok = ok && (ZstrCompare(StrBegin(&out), "\\x1a") == 0);- In
Write.c:3974:
// 0xA1: low nibble 0x01 (<10 -> '1') -- pins the low digit on the <10 side
// of the boundary too => "\xa1".
StrPushBackR(&src, 0xA1);
StrAppendFmt(&out, "{c}", src);
ok = ok && (ZstrCompare(StrBegin(&out), "\\xa1") == 0);- In
Write.c:5067:
DBG_BEGIN(dbg, out);
Str s = StrInit(&dbg);
StrPushBackR(&s, (char)0x01);
StrPushBackR(&s, (char)0x4F); // multi-digit so StrLen(&hex)!=1 path
StrAppendFmt(&out, "{x}", s);- In
Write.c:5068:
Str s = StrInit(&dbg);
StrPushBackR(&s, (char)0x01);
StrPushBackR(&s, (char)0x4F); // multi-digit so StrLen(&hex)!=1 path
StrAppendFmt(&out, "{x}", s);
bool ok = (ZstrCompare(StrBegin(&out), "0x01 0x4f") == 0);- In
Write.c:5080:
DBG_BEGIN(dbg, out);
Str s = StrInit(&dbg);
StrPushBackR(&s, (char)0x05);
StrAppendFmt(&out, "{x}", s);
bool ok = (ZstrCompare(StrBegin(&out), "0x05") == 0);- In
Write.c:5470:
Str s = StrInit(ALLOCATOR_OF(&sa));
for (int i = 0; i < 8; ++i)
StrPushBackR(&s, (char)0xAB);
DebugAllocator dbg = DebugAllocatorInitWith(LEAK_CFG);
Str out = StrInit(ALLOCATOR_OF(&dbg));- In
Insert.c:220:
// Push characters at the back
StrPushBackR(&s, ' ');
StrPushBackR(&s, 'W');
StrPushBackR(&s, 'o');- In
Insert.c:221:
// Push characters at the back
StrPushBackR(&s, ' ');
StrPushBackR(&s, 'W');
StrPushBackR(&s, 'o');
StrPushBackR(&s, 'r');- In
Insert.c:222:
StrPushBackR(&s, ' ');
StrPushBackR(&s, 'W');
StrPushBackR(&s, 'o');
StrPushBackR(&s, 'r');
StrPushBackR(&s, 'l');- In
Insert.c:223:
StrPushBackR(&s, 'W');
StrPushBackR(&s, 'o');
StrPushBackR(&s, 'r');
StrPushBackR(&s, 'l');
StrPushBackR(&s, 'd');- In
Insert.c:224:
StrPushBackR(&s, 'o');
StrPushBackR(&s, 'r');
StrPushBackR(&s, 'l');
StrPushBackR(&s, 'd');- In
Insert.c:225:
StrPushBackR(&s, 'r');
StrPushBackR(&s, 'l');
StrPushBackR(&s, 'd');
// Check that the characters were inserted correctly
- In
Type.c:30:
// Check that it behaves like a Vec of chars
StrPushBackR(&s, 'H');
StrPushBackR(&s, 'e');
StrPushBackR(&s, 'l');- In
Type.c:31:
// Check that it behaves like a Vec of chars
StrPushBackR(&s, 'H');
StrPushBackR(&s, 'e');
StrPushBackR(&s, 'l');
StrPushBackR(&s, 'l');- In
Type.c:32:
StrPushBackR(&s, 'H');
StrPushBackR(&s, 'e');
StrPushBackR(&s, 'l');
StrPushBackR(&s, 'l');
StrPushBackR(&s, 'o');- In
Type.c:33:
StrPushBackR(&s, 'e');
StrPushBackR(&s, 'l');
StrPushBackR(&s, 'l');
StrPushBackR(&s, 'o');- In
Type.c:34:
StrPushBackR(&s, 'l');
StrPushBackR(&s, 'l');
StrPushBackR(&s, 'o');
bool result = (StrLen(&s) == 5 && ZstrCompare(StrBegin(&s), "Hello") == 0);- In
Foreach.c:157:
StrForeach(&s, chr) {
// Append the character to the result string
StrPushBackR(&result, chr);
}- In
Foreach.c:183:
StrForeachReverse(&s, chr) {
// Append the character to the result string
StrPushBackR(&result, chr);
char_count++;
}- In
Foreach.c:215:
StrForeachPtr(&s, chrptr) {
// Append the character (via pointer) to the result string
StrPushBackR(&result, *chrptr);
// Modify the original string by converting to uppercase
- In
Foreach.c:249:
StrForeachPtrReverse(&s, chrptr) {
// Append the character (via pointer) to the result string
StrPushBackR(&result, *chrptr);
// Modify the original string by converting to uppercase
- In
Foreach.c:299:
StrForeachInRangeIdx(&s, chr, idx, 3, 3) {
// This block should not execute
StrPushBackR(&empty_result, chr);
}- In
Foreach.c:324:
StrForeachInRange(&s, chr, 0, 5) {
// Append the character to the result string
StrPushBackR(&result, chr);
}- In
Foreach.c:334:
StrForeachInRange(&s, chr, 6, 11) {
// Append the character to the result string
StrPushBackR(&end_result, chr);
}- In
Foreach.c:391:
StrForeachPtrInRange(&s, chrptr, 0, 5) {
// Append the character to the result string
StrPushBackR(&result, *chrptr);
// Modify the original string by converting to uppercase
- In
Access.c:29:
result = result && StrEmpty(&s);
StrPushBackR(&s, 'H');
StrPushBackR(&s, 'i');- In
Access.c:30:
StrPushBackR(&s, 'H');
StrPushBackR(&s, 'i');
result = result && (StrLen(&s) == 2); char c = StrBegin(output)[i];
if (c != ' ' && c != '\n' && c != '\r' && c != '\t') {
StrPushBackR(&output_clean, c);
}
} char c = StrBegin(&expected_str)[i];
if (c != ' ' && c != '\n' && c != '\r' && c != '\t') {
StrPushBackR(&expected_clean, c);
}
} char c = StrBegin(output)[i];
if (c != ' ' && c != '\n' && c != '\r' && c != '\t') {
StrPushBackR(&output_clean, c);
}
} char c = StrBegin(&expected_str)[i];
if (c != ' ' && c != '\n' && c != '\r' && c != '\t') {
StrPushBackR(&expected_clean, c);
}
} char c = StrBegin(output)[i];
if (c != ' ' && c != '\n' && c != '\r' && c != '\t') {
StrPushBackR(&output_clean, c);
}
} char c = StrBegin(&expected_str)[i];
if (c != ' ' && c != '\n' && c != '\r' && c != '\t') {
StrPushBackR(&expected_clean, c);
}
}
Last updated on