How to take out the space using LotusScript?

Hello, My question is how to write LotusScript instead of this formula?

string=@if(str1=“”;“”;str1+“;”)+@if(str2=“”;“”;str2+“;”)+@if(str3=“”;“”;str3)

that means if str1=“”, str2=“ab”, str3=“cd”

then string=“ab;cd”

I don’t want get the result like “;;ab;cd”

I don’t know how to use lotusscript to instead of @if in the coding.

Many thanks in advance.

Linda

Subject: how to take out the space ?

try @ReplaceSubstring

Subject: how to take out the space using LotusScript?

Your formula language version could have been:

string := @Implode(@Trim(str1:str2:str3);“;”)

In LotusScript, you can use either method. The @If version would translate to this:

If str1 <> “” Then

string = str1

End If

If str2 <> “” Then

If string = “” Then

string = str2

Else

string = string + “;” + str2

End If

If str3 <> “” Then

If string = “” Then

string = str3

Else

string = string + “;” + str3

End If

The @Implode version would be something like this:

Dim strArray(0 to 2) As String

strArray(0) = str1

strArray(1) = str2

strArray(2) = str3

string = Join(FullTrim(strArray), “;”)

Subject: RE: how to take out the space using LotusScript?

Hi Stan, It was very very nice to “see” you. The answer is exactly what I want.

Many thanks for all your help.(you helped me a lot before). ^-^

Linda