【发布时间】:2011-02-07 15:18:53
【问题描述】:
如何在 NSIS 中连接 2 个字符串?
【问题讨论】:
标签: string nsis string-concatenation concatenation
如何在 NSIS 中连接 2 个字符串?
【问题讨论】:
标签: string nsis string-concatenation concatenation
StrCpy $1 "one string"
StrCpy $2 " second string"
MessageBox MB_OK "$1$2"
【讨论】:
StrCpy $1 "Hello"
StrCpy $2 "World"
StrCpy $3 "$1 $2"
DetailPrint $3
【讨论】:
如果您想使用相同的变量进行连接,您可以执行以下操作:
StrCpy $1 "ABC"
StrCpy $1 "$1123"
DetailPrint $1
输出为“ABC123”
【讨论】:
如果您希望将一个长字符串拆分为多行,只需在引号内使用\:
MessageBox MB_OK "Alright, Mr. User you are done here, so you can go ahead and \
stop reading this message box about now."
【讨论】: