How to compare two strings


#1

How do we compare two strings?


#2

We compare using comparison operators.

==  => is the same

<   => comes before

>   => comes after
 > 'aabb' < 'abba'
=> true
 > 'abba' > 'aabb'
=> true
 > 'abba' == 'abba'
=> true
 > 

#3

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