@Begins LotusScript Equivalent

Mindwatering Incorporated

Author: Tripp W Black

Created: 01/04/2013 at 02:10 PM

 

Category:
Notes Developer Tips

Issue:
Need to see if one string is the beginning of another string

Solution:

Function StrBegins (fullString As String, subString As String) as Integer
' start failure
StrBegins = 0
' sanity check
If (fullString="") Then
Exit Function
End If
If (subString="") Then
Exit Function
End If
' compare two strings
If Instr ( fullString, subString) = 1 Then
StrBegins = 1
Else
' fullString does NOT start with subString , return failure
End If
End Function



previous page