@LeftBack and RightBack equivalent in LotusScript


LotusScript

@LEFTBACK

Function AtLeftBack(valuein As String, delimiter As String) As String
	
	valueout=""     
	Dim valueLength As Integer
	valueLength = Len(valuein)
	
        For i=valueLength To 1 Step -1
		If Mid(valuein,i,1)=delimiter Then
			valueout =Left (valuein, i-1 )
			Exit For
		End If
	Next
	
	AtLeftBack = valueout
	
End Function

@RIGHTBACK

Function AtRightBack(valuein As String, delimiter As String) As String
	
	valueout=""     
	Dim valueLength As Integer
	valueLength = Len(valuein)
	
	For i=1 To valueLength Step 1
		If Mid(valuein,i,1)=delimiter Then
			valueout =Right (valuein, valueLength-i )
			Exit For
		End If
	Next
	
	AtRightBack = valueout
	
End Function

Written by Frank Joseph Brefere III

Posted by fbrefere001 on Wednesday March 25, 2009