How to compare if two texts are different?

IamBot

Member
Licensed User
Longtime User
Hi,

This is a silly but short question...

How do I check if two texts differs?

E.g, to check if they are equal, you can write:

IF EditText1.text = EditText2.text then ...

So I guess I'm looking for the Not Equal sign...

Also, if anyone has any useful link for such questions, I would appreciate it.


Thankful for answers...
 

mc73

Well-Known Member
Licensed User
Longtime User
Have a look at .CompareTo function. In your specific case, I think that you can also use EditText1.text <> EditText2.text.
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
Hi,

This is a silly but short question...

How do I check if two texts differs?

E.g, to check if they are equal, you can write:

IF EditText1.text = EditText2.text then ...

So I guess I'm looking for the Not Equal sign...

Also, if anyone has any useful link for such questions, I would appreciate it.


Thankful for answers...

Not equal: <>

You can use EqualsIgnoreCase to ignore case:
if Not(Edit1.Text.EqualsIgnoreCase(EditText2.Text)) then
 
Upvote 0
Top