## U16String::CompareTo(const U16String\&) const method


Compares this instance with a specified string object.

```cpp
int32_t Aspose::Cells::U16String::CompareTo(const U16String &value) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| value | const U16String\& | The string to compare with this instance. |

## ReturnValue

A 32-bit signed integer that indicates the lexical relationship between the two comparands. -1: this instance precedes value in the sort order. 0: this instance occurs in the same position as value in the sort order. > 0: this instance follows value in the sort order.

## See Also

* Class [Vector](../../vector/)
* Class [U16String](../)
* Class [U16String](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
## U16String::CompareTo(const U16String\&, bool) const method


Compares this instance with a specified string object, ignoring or honoring their case.

```cpp
int32_t Aspose::Cells::U16String::CompareTo(const U16String &value, bool ignoreCase) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| value | const U16String\& | The string to compare with this instance. |
| ignoreCase | bool | true to ignore case during the comparison; otherwise, false. |

## ReturnValue

A 32-bit signed integer that indicates the lexical relationship between the two comparands. -1: this instance precedes value in the sort order. 0: this instance occurs in the same position as value in the sort order. > 0: this instance follows value in the sort order.

## See Also

* Class [Vector](../../vector/)
* Class [U16String](../)
* Class [U16String](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
