Top "String-literals" questions

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

Difference between string literal and constexpr array of char

I have been wondering if there is any difference between what is being pointed by ptrToArray and ptrToLiteral in the …

c++ c++11 constexpr string-literals
What's the "E" before a Postgres string?

I was reading a Postgres/PostGIS statement like this: SELECT ST_AsBinary( ST_GeomFromWKB( E'\\001\\001\\000\\000\\000\\321\\256B\\312O\\304Q\\300\\347\\030\\220\\275\\336%E@', 4326 ) ); …

postgresql postgis string-literals wkb
Include )" in raw string literal without terminating said literal

The two characters )" terminate the raw string literal in the example below. The sequence )" could appear in my text at …

c++ c++11 delimiter string-literals rawstring
How to define string literal union type from constants in Typescript

I know I can define string union types to restrict variables to one of the possible string values: type MyType = …

typescript string-literals typescript3.0 union-types
How to cast a String variable to a String Literal Type in Typescript

In Typescript, suppose I want to call a function with following signature- function foo(param: "TRUE"|"FALSE"|"NONE") How can …

typescript casting string-literals
Does Haskell concatenate String literals at compile time?

Does Haskell 2010 guarantee to concatenate String literals at compile time? If I have "This is a " ++ "very long String that " ++ "…

haskell concatenation string-literals
Where do Java and .NET string literals reside?

A recent question about string literals in .NET caught my eye. I know that string literals are interned so that …

java .net string-literals string-table
Keeping code structure with string literal that uses whitespace

So a bit of a weird question I was having trouble coming up with the search terms for. If I …

c# indentation string-literals
Using strings in switch statements - where do we stand with C++17?

Every one of us has (probably) had the childhood dream of writing: switch(my_std_string) { case "foo": do_stuff(); …

c++ switch-statement stdstring c++17 string-literals
Searching For String Literals

In the quest for localization I need to find all the string literals littered amongst our source code. I was …

.net string localization string-literals