Compare 2 strings

 Problem

I have two strings and want to compare them lexicographically (what comes first in a "dictionary").



 Recipe


// String literals
let s1 = "Hello World"
let s2 = "Hello Guys"
 
// Compare the 2 strings
// lexicographically

if s1<s2 {
    print("S1 comes before S2")
}
else {
    print("S1 comes after S2")
}
				


 Playground