Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/2116-standardlibrary-stringoperations-cstring-cstringcompare.md
T
2026-06-23 21:47:51 +08:00

42 lines
702 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Compare
Compares to a string.
```
int  Compare(
   const string  str      // string
   ) const;
```
Parameters
str
[in]  String to compare.
Return Value
0 - both strings are equal, -1 - the class string is lower than the string to compare, 1 - the class string is greater than the string to compare.
# Compare
Compares to a CString class instance string.
```
int  Compare(
   CString*  str      // pointer
   ) const;
```
Parameters
str
[in]  Pointer to CString class instance to compare.
Return Value
0 - strings are equal, -1 - the class string is lower than the string to compare, 1 - the class string is greater than the string to compare.