Top "String-literals" questions

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

Perl replace multiple strings simultaneously

Is there any way to replace multiple strings in a string? For example, I have the string hello world what …

regex arrays perl replace string-literals
C/C++, can you #include a file into a string literal?

I have a C++ source file and a Python source file. I'd like the C++ source file to be able …

c++ c include c-preprocessor string-literals
Adding a string to the verbatim string literal

I have a path that is named defaultPath I want to add it into this verbatim string literal but can …

c# string-literals verbatim-string
"Life-time" of a string literal in C

Wouldn't the pointer returned by the following function be inaccessible? char *foo(int rc) { switch (rc) { case 1: return("one"); case 2: …

c function local-variables string-literals lifetime
Using "constexpr" to use string literal for template parameter

I have written some code to cast const char* to int by using constexpr and thus I can use a …

c++ templates c++11 string-literals constexpr
Unicode string literals

C++11 introduces a new set of string literal prefixes (and even allows user-defined suffixes). On top of this, you can …

c++ c++11 unicode string-literals unicode-literals
How to use tab in disp()?

disp(['counter ' num2str(blk) (here I need a tab!!!) 'adc ' num2str(adc_nr)])

matlab tabs ascii string-literals disp
How to declare constexpr C string?

I think i quite understand how to use the keyword constexpr for simple variable types, but i'm confused when it …

c++ constexpr c-strings string-literals
Reference to string literals in Go

In my application I will frequently pass references to a static string. I wish to avoid having Go allocate memory …

string pointers go string-literals
Concat two `const char` string literals

Is it possible to concat two string literals using a constexpr? Or put differently, can one eliminate macros in code …

c++ c++11 c-preprocessor constexpr string-literals