Procedure.l x_rfindstring(string.s,find.s) ; find string find.s in string.s starting from the right side
Protected l.l , p.l
;
; *** find a string in another string, starting from the right
;
l.l = Len(find.s)
p.l = Len(string.s)
If l > 0 And p > 0
p = p + l
Repeat
p = p - 1
Until p.l = 0 Or Mid(string,p,l) = find
EndIf
ProcedureReturn p
EndProcedure
i admit it's probably not the best way to do it
i think this should be a standard purebasic command though, imho etc.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )