(C++) raw string
June 14, 2019 · View on GitHub
A raw string is a type of string literal that has no escape sequences.
const std::string s = R"(/\/\/\/\)"
Use raw strings for string literals with complicated uses of backslash [1].
Examples
References
- Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 7.8. Advice, page 199: '[8] Use raw strings for string literals with complicated uses of backslash'