## String::CompareTo method


以 'less-equals-more' 风格比较两个字符串。使用当前区域性。

```cpp
int System::String::CompareTo(const String &str) const
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| str | const String\& | [String](../) 用于与之比较。 |

### ReturnValue

如果此值被视为低于 str 则为负值，匹配时为零，若大于 str 则为正值。

## 另见

* Class [String](../)
* Class [String](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
