Apr 14 2012
12:50 Hours
I though that this string function would only return -1 if the index was not found.
e.g.
if '/' is NOT found, S.LastIndexOf("/") returns 64 NOT -1.
What other error codes can this function return?
Ray Tesluk :sign0104:
12:50 Hours
I though that this string function would only return -1 if the index was not found.
e.g.
B4X:
Sub SplitFF(S As String)
Dim p As Int
Try
p = S.LastIndexOf("/")
'Msgbox(p,"")
If p <> -1 AND p <> 64 Then
CodeModule.sFolder = S.SubString2(0, p)
CodeModule.sFileName = S.SubString(p + 1)
CodeModule.sFileNameShortName = CodeModule.sFileName.SubString2(0, CodeModule.sFileName.IndexOf("."))
End If
Catch
Msgbox(LastException.Message,"SplitFF Sub")
End Try
End Sub
if '/' is NOT found, S.LastIndexOf("/") returns 64 NOT -1.
What other error codes can this function return?
Ray Tesluk :sign0104:
Last edited: