Manage Learn to apply best practices and optimize your operations.

Function Instrback(Istring As String , Searchfor As String ) As Integer

In the Notes Help I could not find any function to return the position of a
substring from the right of a string.

Here is one:
Function InstrBack(IString As String , SearchFor As String ) As Integer

'// Get the position of SearchFor in IString from the right of IString

i% = 1
flag% = 0
Do Until flag% = 1
If Left$ ( Rightbp$ ( IString , i% ) , 1 ) = "\" Then
flag% = 1
i% = i% + 1
End If
InstrBack = ( i% - 1 )
End Function

'Using the InstrBack-function it is easy to 'extract the fileName from a String
containing 'DrivePathFile-information

Function ExtractFileName( FilePath As String ) As String
'// Extract the FileName from FullPath
ExtractFileName = Rightbp$( FilePath , InstrBack ( FilePath , "\" ) )
End Function

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...