# Compare strings

* cmp
* Less
* Equal
* Greater
* Ordering

* We can use the regular `<`, `>`, `==` operators to compare both strings and string slices.
* The `cmp` method returns a value from the [Ordering](https://doc.rust-lang.org/std/cmp/enum.Ordering.html) enum.

{% embed include file="src/examples/strings/compare-strings/src/main.rs" %}
{% embed include file="src/examples/strings/compare-strings/out.out" %}


