Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我想将字符串文字转换为字符串值,任何人都可以指导我这样做
例如,我想将以下字符串文字转换为字符串值。
“你好\r\n世界”
进入“你好世界”
您尝试使用哪种语言来完成此操作?
例如,在 C++ 中,您可以这样做:
#include <string> ... std::string s = "Hello \r\n World";
要将对象创建为 STL 字符串(假设“字符串值”是指要将字符串存储在某种形式的类中?
您的问题确实可以从一些澄清中受益。