Top "String-literals" questions

String literals concern the syntactic representation of literal constant strings in C and C++.

How to "instanceof" a primitive string (string literal) in JavaScript

In JavaScript, I can declare a string in the following ways; var a = "Hello World"; var b = new String("Hello …

javascript string instanceof string-literals
How to make Jade stop HTML encoding element attributes, and produce a literal string value?

UPDATE Jade v0.24.0 fixes this with a != syntax for attributes. option(value!='<%= id %>') I'm trying to …

templates underscore.js pug html-encode string-literals
Which method is correct for Initializing a wchar_t string?

I am writing a program and I need to initialize a message buffer which will hold text. I am able …

c arrays string-literals wchar-t
shared c constants in a header

I want to share certain C string constants across multiple c files. The constants span multiple lines for readability: const …

c header constants string-literals
Computing length of a C string at compile time. Is this really a constexpr?

I'm trying to compute the length of a string literal at compile time. To do so I'm using following code: #…

c++ c++11 standards constexpr string-literals
Is the u8 string literal necessary in C++11

From Wikipedia: For the purpose of enhancing support for Unicode in C++ compilers, the definition of the type char has …

c++ utf-8 c++11 literals string-literals
warning: missing terminating " character [enabled by default]

I am getting this weird error below json.c:81:19: warning: missing terminating " character [enabled by default] json.c:81:3: error: missing …

c string-literals json-c
What is the rationale for parenthesis in C++11's raw string literals R"(...)"?

There is a very convenient feature introduced in C++11 called raw string literals, which are strings with no escape characters. …

c++ c++11 standards string-literals
What is the r#""# operator in Rust?

I saw the operator r#"" in Rust but I can't find what it does. It came in handy for creating …

string rust syntax string-literals
Does javascript have literal strings?

In c# and ruby and many other languages you can denote a string as to not need escaping. in c# …

javascript string string-literals