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 文字列として作成するには (「文字列値」と仮定すると、文字列を何らかの形式のクラスに格納することを意味しますか?
あなたの質問は、少し明確にすることで本当に恩恵を受けることができます。