我在PowerShell中编写脚本,它将显示一条长消息。基本上,我试图弄清楚如何将字符串分成多行,但它仍然会显示为单行。如何使字符串段更容易阅读源代码
$paragraph = "This is a test to create a single-lined string,
but it doesn't seem to work. I would prefer
to make source code easier to read."
预期输出:
This is a test to create a single-lined string, but it doesn't seem to work. I would prefer to make source code easier to read.
实际输出:
This is a test to create a single-lined string.`
but it doesn't seem to work. I would prefer
to make source code easier to read.
我一直在使用反引号试过了,但是这会产生相同的结果。任何人都知道格式化我的代码的正确方法?