Skip to content
⌘ NSIS Forum Archive

Adding strings

5 posts

ikoonman#

Adding strings

Would somebody tell me how to concat two strings into one, ie. "This should" + " be easy" = "This should be ease".
Afrow UK#
$R0 = "This should"
$R1 = " be easy"

StrCpy $R0 $R0$R1

$R0 = "This should be easy"

And, yes it really is that easy.

-Stu
ikoonman#
Thanks.

That works ok, but what if I wanted to append to an existing string $MyRes?

Will the code be something like:

#$MyStr contains some information

StrCpy $MyStr $MyStr$MyDelimiter # adds a space to existing string
StrCpy $MyStr $MyStr$NewDataToAdd

I tested this and my results ends up being the last added data. It does not append.