Compare views with ordering. * * @param lhs input view * @param rhs input view * @return The ordered comparison value. * * - -1 if @a lhs is less than @a rhs * - 1 if @a lhs is greater than @a rhs * - 0 if the views have identical content. * * If one view is the prefix of the other, the shorter view is less (first in the ordering). * * @note For string views, there is no difference b
| 61 | * @see memcmp |
| 62 | */ |
| 63 | inline int |
| 64 | strcmp(const std::string_view &lhs, const std::string_view &rhs) { |
| 65 | return memcmp(lhs, rhs); |
| 66 | } |
| 67 | |
| 68 | /** Copy bytes. |
| 69 | * |