Comparison in string

please can you explain me comprision in strings

hi @harilal
when u compare say s1 with s2
if u write s1.compare(s2) then
case 1) if s1 == s2 then it will output 0
case 2) if s1 < s2 means (s1 is alphabetically smaller than s2) then it will output negative number
case 3) if s1 > s2 means (s2 is alphabetically smaller than s1) then it will output positive number

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.