如何将多个变量拼接成一段完整的文字字符串?
- 内容介绍
- 文章标签
- 相关推荐
本文共计299个文字,预计阅读时间需要2分钟。
我尝试将变量连接成纯文字字符串,纯文本是为了提高可读性。例如,`myString=test`,`myString2=[first part of the string, this is a \ + myString + \ string, last part of the string]`,然后输出`myString2`。但这实际上输出的是字符串“first part of the string this is a test string last part of the string。
本文共计299个文字,预计阅读时间需要2分钟。
我尝试将变量连接成纯文字字符串,纯文本是为了提高可读性。例如,`myString=test`,`myString2=[first part of the string, this is a \ + myString + \ string, last part of the string]`,然后输出`myString2`。但这实际上输出的是字符串“first part of the string this is a test string last part of the string。

