Help with exact string match
Posted on 2007-04-06
I'm looping through the folder appA and all of its subfolders. Some of the folders are:
I set a variable that will be used as a relative path for the appA folder
Root = "appA"
Inside the loop, I may be on this folder:
paramDirectoryPath = "c:\dev\myapps\appA\obj"
and I create the relative path on each iteration this way:
It creates a relative root path for all subfolders in the appA folder.
I run into a problem when
paramDirectoryPath = "c:\dev\myapps\appA\obj\appAUI"
The LastIndexOf() code will give
"appAUI" instead of "appA".
I need to somehow get an exact, case insensitive match. IndexOf() doesn't do this. What is a way that I can get around that?