Replace a single specific character in a string

The LotusScript version of @ReplaceSubstring. The example below was used to take a Windows filepath and convert it to a URL filepath.

Dim dbfilepath As String
dbfilepath = db.filepath
Dim valueLength As Integer
valueLength = Len(db.filepath)
Dim dbfilepath2 As String
Dim character As String
For i= 1 To valueLength Step 1
	character = Mid(db.filepath,i,1)
	If character="\" Then
		dbfilepath2 = dbfilepath2 & "/"
		dbfilepath2 = dbfilepath2 & character
	End If

Posted by fbrefere001 on Tuesday July 27, 2004