TO Upper & To Lower Case ignore and match with string
myString = FtpAddressUrl + BranchName + "-ON" + "/" + ftp_Folder;if (subdirectoryEntries.Any(myString.ToUpper().Contains) || subdirectoryEntries.Any(myString.ToLower().Contains))
{
}
myString define as a string .
subdirectoryEntries is a collection of list.
In subdirectoryEntries it is reterive the folder from the FTP and in myString it is string variable.
In mystring i am storing FtpAddressUrl ,BranchName ,ftp_Folder and pass ON is static.
But some cases when i am comparing with the string it i condition fails
when BranchName is in Capital letter & on is in Small letter. Always it fails according to my if condition, where i am taking lower and upper cases.
Example: On subdirectoryEntries it is showing this (jaid-ON/)
jaid it is Branch it is in small letter
ON it is in Capital Letter
So i don't have any idea how i can put my condition
if (subdirectoryEntries.Any(myString.ToUpper().Contains) || subdirectoryEntries.Any(myString.ToLower().Contains))
{
}
According to my condition Branch name it should completely either Capital or Small.
Means This condition i am managing.
jaid-on/ (Branch Name + on)
JAID_ON (Branch Name + ON)
But I have to manage another condition that string match condition
jaid-ON/ (Branch Name + ON)
JAID-on/ (Branch Name + on)
How i can do it