ungetc
that allows you to
push back one character back into your string. But just one — it does
not guarantee to work if you try to push back any more immediately afterwards.
That can be useful for pushing back first character that is not a space in spaces-delimited data, instead of having to buffer it.
a+
flag for fopen
should allow you to
append to the and of a file without seeking to end or ensuring a file lock,
and read from any place in that file by use of fseek
strdup
, isspace
, strcmp
, strlen
, memcpy
, snprintf
,
puts
, putc
, atoi
noneelement) and an array of all their strings (as
const char* const
)
written in same order, and a function to compare the input agains each of all from zero to
the noneelement
So you can, like, «
"\033" "[1;33m" "[%s]" "\033" "[0m" " : "
»
when it comes to stuff like ANSI escape codes which sometimes feel like they mix up with other stuff.
That can be useful for writing strings that are too long for one line. Note that you will still need
\n
escapes at the ends for multiline strings with line breaks.