I'm trying to compare two Strings in Scala, trying to find out which comes first in the alphabet. I.e. *a* before *b*, *aab* before *abb*, etc. 

It seems like the `>` and `<` operators are doing exactly this job:

> 
> scala> "b" > "a" 
> 
> 
> res14: Boolean = true
> 
> 
> scala> "b" < "a" 
> 
> 
> res15: Boolean = false
> 
> 
> scala> "aab" < "abb" 
> 
> 
> res16: Boolean = true
> 
> 
> 

However, the [doc](http://www.scala-lang.org/api/2.12.x/scala/collection/immutable/StringOps.html#>(that:A):Boolean) did not enlighten me on what this really does, and none of the tutorials online seem to be using this method to compare strings. Thus, I was wondering:

* Is this a fail safe approach to do what I want to do, i.e. compare two Strings for alphabetical order?
* Is there a more common approach in Scala that I am missing here?
* How exactly does it work - e.g.

> 
> scala> "?" > "!"
>  res25: Boolean = true
> 
> 
> 

is not intuitive to me.