LEFT in lotusscript

Hi

Is it possible to do same thing than @Left(string;" ") in lotuscript ?

I try to extract left until space character

Thanks

Subject: LEFT in lotusscript

Instr will find position of string within string, left can then be used to extract the relevant string.

Subject: LEFT in lotusscript

Try the following function.

'Simulates the @Left command

Function sLeft ( sourceString As String, searchString As String ) As String

pos% = Instr ( sourceString, searchString )

If pos% > 0 Then pos% = pos% -1

sLeft = Left ( sourceString, pos% )

End Function

Subject: LEFT in lotusscript

StrLeft is the function you’re looking for.

Look up the help for the formula function. Near the bottom should be a description of the equivilant LotusScript function.

Subject: LEFT in lotusscript - the easy solution

Using StrLeft will do the trick…

Works the same way as @left.

From the Designer Help:

Syntax

STRLeft( STRING S1, STRING S2 [, SHORT flag [, LONG occurrences ]] )

As STRING

STRLeft$(. . .)

Elements

S1

A String to search for the specified pattern.

S2

The pattern to search s1 for.

flag

Flags specify which comparison to use.

Flag Type of Comparison

0 Case Sensitive, Pitch Sensitive

1 Case Insensitive, Pitch Sensitive

4 Case Sensitive, Pitch Insensitive

5 Case Insensitive, Pitch Insensitive