cpp/string/basic string/operator cmp

Compares the contents of a string with another string or a null-terminated array of.

All comparisons are done via the compare member function (which itself is defined in terms of ):


 * Two strings are equal if both the size of and  are equal and each character in  has equivalent character in  at the same position.


 * The ordering comparisons are done lexicographically -- the comparison is performed by a function equivalent to std.

@1-7@ Compares two objects.

@8-14@ Compares a object and a null-terminated array of.

Return value
@1-6,8-13@ if the corresponding comparison holds,  otherwise. @7,14@.

Complexity
Linear in the size of the strings.