Luna::BasicString::compare
i32 compare(usize pos1, usize count1, const value_type *s, usize count2) const
Compares [pos1, pos1 + count1) substring of this string to the characters in the range [s, s + count2).
Parameters
-
in pos1
The index of the first character in
*thisto compare. -
in count1
The number of characters in
*thisto compare. Ifpos1 + count1is greater thanthis->size(),count1will be clamped tothis->size() - pos1. -
in s
The string to compare with.
-
in count2
The number of characters in
sto compare.
Valid Usage
-
pos1must not be greater thanthis->size(). -
If
count2is not0,smust points to a valid character array with at leastcount2characters.