xtd 0.2.0
Loading...
Searching...
No Matches

◆ compare() [3/6]

static int32 xtd::ustring::compare ( const ustring str_a,
const ustring str_b,
xtd::string_comparison  comparison_type 
)
staticnoexcept

Compares two specified string objects using the specified rules, and returns an integer that indicates their relative position in the sort order.

Parameters
str_aThe first string to compare.
str_bThe second string to compare.
comparison_typeOne of the enumeration values that specifies the rules to use in the comparison.
Returns
A 32-bit signed integer that indicates the lexical relationship between the two compares.
Value Condition
Less than zero str_a precedes str_b in the sort order.
Zero str_a occurs in the same position as str_b in the sort order.
Greater than zero str_a follows str_b in the sort order.