05-23-2025, 10:49 AM
Also reviewing my handy Functions last night I ran into a couple of very useful ones PLUS they reminded me of PhilOfPerth.
So here they are with a demo for @PhilOfPerth
So here they are with a demo for @PhilOfPerth

Code: (Select All)
Test$ = "PhilOfPerth"
Print "Left of "; Test$; " is "; LeftOf$(Test$, "Of")
Print "Right of "; Test$; " is "; RightOf$(Test$, "Of")
Function LeftOf$ (source$, of$)
If InStr(source$, of$) > 0 Then
LeftOf$ = Mid$(source$, 1, InStr(source$, of$) - 1)
Else
LeftOf$ = source$
End If
End Function
' update these 2 in case of$ is not found! 2021-02-13
Function RightOf$ (source$, of$)
If InStr(source$, of$) > 0 Then
RightOf$ = Mid$(source$, InStr(source$, of$) + Len(of$))
Else
RightOf$ = ""
End If
End Function
b = b + ...