:CompareMessageText()
Class
Syntax
:CompareMessageText( cText, [nBytes], [nOffset], [lCaseSensitive], [hMessage] ) -> aResult
Parameters
|
|
cText |
Text to compare with current message part. |
|
|
nBytes |
Optional. Number of bytes to compare. Default is entire string cText. |
|
|
nOffset |
Optional. Number of characters in message part to skip before begriming comparison. |
|
|
lCaseSensitive |
Optional. Logical indicating is comparison should be case sensitive. Default is .F. |
|
|
hMessage |
Optional. Handle of the message to act on. Provided during :CreateMessage() operation |
Return
Returns a three element array with details of the comparison.
Description
The CompareMessageText() method compares the text cText with the text of the current message part.
The result is a three element array that is as follows:
|
|
Constant |
Description |
|
|
MIME_COMPARE_SUCCESS |
If True (.T.), all contents matched and the text cText is the same as the text of the current message part. |
|
|
MIME_COMPARE_BYTES |
Number of Bytes matching before end of comparison or the position of the first non-matching character. |
|
|
MIME_COMPARE_ERROR |
If an error occurred the value is .T., otherwise .F. |
If the comparison is a partial match, aResult[MIME_COMPARE_SUCCESS] will be False (.F.).
To find where in cText the comparison failed, look at aResult[MIME_COMPARE_BYTES].
If aResult[MIME_COMPARE_SUCCESS] = .F. and aResult[MIME_COMPARE_ERROR] = .T. examine :nErr and :cErr for more information.
See Also
:AppendMessageText(), :ClearMessageText(), :GetMessageText(), :SetMessageText()