Comapare two string

Using String manipulation function comare two string & i want to remove case sensitivity


Can you give us some examples?



  1. Use the String.Equals method with the StringComparison.OrdinalIgnoreCase option to compare two strings while ignoring case sensitivity.Example:

vbCopy code

Assign activity:
leftString = "Hello"
rightString = "hello"
areEqual = String.Equals(leftString, rightString, StringComparison.OrdinalIgnoreCase)

In this example, the areEqual variable will be True because the comparison is performed without considering the case of the strings.


name | name | result

Yogita@123 | yogita@123 | match
neha@123 | yogesh@123 | notmatch
akshay@123 | Akshay@123 | match


@raja.arslankhan 's solution will work.

As another approach, the following will also work

strA.ToLower = strB.ToLower 


strA.ToUpper = strB.ToUpper 


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.