Skip to main content

dxSpreadSheetCompareText(string,string) Method

Compares the lexical value of two specified text strings.

Declaration

function dxSpreadSheetCompareText(const S1: string; const S2: string): Integer;

Parameters

Name Type
S1 string
S2 string

Returns

Type
Integer

Remarks

The first overloaded version of the dxSpreadSheetCompareText function accepts two pointers to the compared text strings specified as the S1 and S2 parameters, and two lengths of these strings, excluding the terminating null character, specified as the L1 and L2 parameters, respectively.

The second overloaded version of the dxSpreadSheetCompareText function accepts the first string specified as the S1 parameter and both the pointer to the string and the string’s length as the S2 and L2 parameters, respectively.

The third overloaded version of the dxSpreadSheetCompareText function accepts two strings specified as the S1 and S2 parameters.

All overloaded versions of the dxSpreadSheetCompareText function can return the following values:

Value

Meaning for the Respective dxSpreadSheetCompareText Overloaded Variant

First

Second

Third

-1

The string pointed to by the S1 parameter is less in lexical value than the string pointed to by the S2 parameter.

The string specified as the S1 parameter is less in lexical value than the string pointed to by the S2 parameter.

The string specified as the S1 parameter is less in lexical value than the string specified as the S2 parameter.

0

The string pointed to by the S1 parameter is equal in lexical value to the string pointed to by the S2 parameter.

The string specified as the S1 parameter is equal in lexical value than the string pointed to by the S2 parameter.

The string specified as the S1 parameter is equal in lexical value than the string specified as the S2 parameter.

1

The string pointed to by the S1 parameter is greater in lexical value than the string pointed to by the S2 parameter.

The string specified as the S1 parameter is greater in lexical value than the string pointed to by the S2 parameter.

The string specified as the S1 parameter is greater in lexical value than the string specified as the S2 parameter.

See Also