It makes sense for a string to be equal to another string, but how can a string be less than or greater than another string?
A: Good question. What does it mean to say “banana” < “mango”? Well, with strings, you can use alphabetical order to know if one string is less than or greater than another. Because “banana” begins with a “b” and “mango” with an “m”, “banana”...
- 7. Types, Equality, Conversion and All That Jazz: Serious types
- Publisher: O'Reilly Media, Inc.
- Released: March 2014
What does it mean for a string to be less/greater than another string?