by Eugene Levitin (1 Submission)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 17th September 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Function to find the last part of string. If you know PATH name you can "cut off" first part and return just FILE name. fileName =
Dim chrMostRight_tmp As String
Dim nChr, j, Count, chrPlace As Integer
nChr = Len(strInput)
For j = nChr To 1 Step -1
chrMostRight_tmp = Left(strInput, j)
If Right(chrMostRight_tmp, 1) = chrMostRight Then Exit For
Count = Count + 1
Next
chrPlace = nChr - (Count - 1)
strRightPart = Mid$(strInput, chrPlace)
End Function
No comments have been posted about Function to find the last part of string. If you know PATH name you can cut off first part and re. Why not be the first to post a comment about Function to find the last part of string. If you know PATH name you can cut off first part and re.