In principle, comparison operators can be implemented for custom types in a manner similar to calculation operators, with two additional conditions:
Comparison operators must always return a Boolean data type as the function result. The Boolean value informs callers whether the comparison was successful.
You must implement comparison operators in pairs. For example, if you implement an operator that checks for equal, you must also implement an operator that checks for not equal. If you implement a size comparison, you must also implement operators for greater than and less than. The same applies to equal to or greater than and equal to or less than.
The comparison operator implementation for the SuperString class ...