C++ multiline string literal

Well … Sort of. The easiest is to just use the fact that adjacent string literals are concatenated by the compiler: const char *text = “This text is pretty long, but will be ” “concatenated into just a single string. ” “The disadvantage is that you have to quote ” “each part, and newlines must … Read more

Insert text with single quotes in PostgreSQL

String literals Escaping single quotes ‘ by doubling them up → ” is the standard way and works of course: ‘user’s log’ — incorrect syntax (unbalanced quote) ‘user”s log’ Plain single quotes (ASCII / UTF-8 code 39), mind you, not backticks `, which have no special purpose in Postgres (unlike certain other RDBMS) and not … Read more