I am trying to initialize a char array with a long string. However, I do not want it to be NULL terminated.
This:
const char s[] = "The actual string is much longer then this...";
is much easier to read (and to write) than this:
const char s[] = {'T', 'h', 'e', ' ', 'a', 'c', 't', 'u', 'a', 'l', ' ', 's', ...};
but the former gets NULL terminated. Is there a way to avoid the NULL on a string literal?
The reason for doing this is that there is the need to pack densely strings in memory of fixed size length known during development.
NULL-terminator?NULLbetween the strings) for various fast indexing purposes