How to check if array has a string.Three checks on Uppercase,mixed case and lowercase.
If IsDBNull(SQLdr(StrCol1)) = False Then
StrColval1 = SQLdr(StrCol1).ToString
StrColval1 = StrColval1.Trim
If StrColval1 <> String.Empty Then
If Not (Arr1.Contains(StrColval1)) Then
If Not Arr1.Contains(StrColval1.ToLower) Then
Arr1.Add(StrColval1)
End If
End If
End If
End If
Dim strFind as string = "abc"
Dim str1st As String = "ABCd, abcd, AbCd)
Dim str2nd As String
'
str2nd = str1st.Upper.Replace(strFind.Upper, "")
MsgBox _
((str1st.Length - str2nd.Length) / str1st.Length).ToString & " occurences found"
wsh2
Air-coded:
Dim strFind as string = "abc"
Dim str1st As String = "ABCd, abcd, AbCd)
Dim str2nd As String
'
str2nd = str1st.Upper.Replace(strFind.Upper, "")
MsgBox _
((str1st.Length - str2nd.Length) / str1st.Length).ToString & " Occurences Found"
wsh2
Correction:
Dim strFind as string = "abc"
Dim str1st As String = "ABCd, abcd, AbCd)
Dim str2nd As String
'
If strFind.Length > 0 Then
str2nd = str1st.Upper.Replace(strFind.Upper, "")
MsgBox _
((str1st.Length - str2nd.Length) / strFind.Length).ToString & " Occurences Found"
End If
Cheers! Any suggestion how can i use it my code...