How could I include a unit separator (value 31 in ascii table) in a string other than using snprintf()? I want to do like we normally initialize a string.
eg
char[100] a = "abc"
How could I include a unit separator (value 31 in ascii table) in a string other than using snprintf()? I want to do like we normally initialize a string.
eg
char[100] a = "abc"
31 in dec = 0x1f in hex. Therefore,
char x[] = "blah\x1f" "blah";
// ^^^^ unit separator.
The string is split into two to avoid the compiler reading the escape sequence as 0x1fb. Alternatively you could use octal sequence:
char x[] = "blah\037blah";
// ^^^^ unit separator.