MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / compare

Method compare

include/stringzilla/stringzilla.hpp:3062–3062  ·  view source on GitHub ↗

* @brief Compares two strings lexicographically. If prefix matches, lengths are compared. * @return 0 if equal, negative if `*this` is less than `other`, positive if `*this` is greater than `other`. */

Source from the content-addressed store, hash-verified

3060 * @return 0 if equal, negative if `*this` is less than `other`, positive if `*this` is greater than `other`.
3061 */
3062 int compare(string_view other) const noexcept { return view().compare(other); }
3063
3064 /**
3065 * @brief Compares two strings lexicographically. If prefix matches, lengths are compared.

Callers 4

test_comparisonsFunction · 0.45
test.jsFile · 0.45
compareMethod · 0.45

Calls

no outgoing calls

Tested by 2

test_comparisonsFunction · 0.36