Jump to content

string compare


Recommended Posts

$string = "damn...in 8 weeks I'm home...can't wait !"
$string2 = "Damn...in 8 weeks I'm home...can't wait !"

; 1st example
; Not case sensitive

If $string = $string2 Then
MsgBox(64,"","Matched !")
Else
MsgBox(64,"","Didn't match..")
EndIf

;2nd example
; Case sensitive

If $string == $string2 Then
MsgBox(64,"","Matched !")
Else
MsgBox(64,"","Didn't match..")
EndIf

(Code is untested, but should work)

Note the use of the two "==" in the second example,

which requires an exact match... Case sensitive !

Edited by Helge
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...