SysCompareText Class [AX 2012]
The SysCompareText class compares two strings and returns detailed information about their differences.
| Method | Description | |
|---|---|---|
| addText | Adds text to the result. |
| buildCRC | Builds an array of hash keys from strings. |
| buildMatrix | Builds a similarity matrix by comparing hash keys. |
| buildRef | Populates the TmpCompareText table with information from the matrix. |
| buildResult | Builds the results container. |
| cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) |
| compare | Compares two strings. |
| equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) |
| getResult | Returns the results of the comparison. |
| getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) |
| handle | Retrieves the handle of the class of the object. (Inherited from Object.) |
| init | Initializes member variables for the text comparison. |
| new | Initializes a new instance of the Object class. (Inherited from Object.) |
| notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) |
| notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) |
| objectOnServer | Determines whether the object is on a server. (Inherited from Object.) |
| owner | Returns the instance that owns the object. (Inherited from Object.) |
| parmAlternateLines | Gets or sets the AlternateLines parameter. |
| parmCaseSensitive | Gets or sets the CaseSensitive parameter. |
| parmLineNumbers | Gets or sets the LineNumbers parameter. |
| parmSingleLine | Gets or sets the SingleLine parameter. |
| parmSuppressWhiteSpace | Gets or sets the SuppressWhiteSpace parameter. |
| setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) |
| str2Con | Converts text to a container that is ready for a comparison. |
| toString | Returns a string that represents the current object. (Inherited from Object.) |
| trimEnd | |
| trimStart | |
| usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) |
| wait | Pauses a process. (Inherited from Object.) |
| xml | Returns an XML string that represents the current object. (Inherited from Object.) |
| ::construct | Initializes a new instance of the SysCompareText class. |
| ::run | Contains the code that does that actual job of the class. |
| ::runCIL | |
| ::runInternal | Provides the starting point for a text comparison. |
| ::suppressWhiteSpace | Removes white space from text. |
The following example demonstrates the functionality of the SysCompareText class.
static void example()
{
str text1 = 'A\nB\nC\nD';
str text2 = 'B\nE\nC\nA';
container compareResult = SysCompareText::run(text1, text2);
}
//compareResult is:
//[
// [SysCompareType::Move1, 'A\n', 6], Moved from here in text1
// to position 6 in text2
// [SysCompareType::Identical, 'B\n'], Identical in text1 and text2
// [SysCompareType::Text2, 'E\n'], Inserted in text2
// [SysCompareType::Identical, 'C\n'], Identical in text1 and text2
// [SysCompareType::Text1, 'D\n'], Inserted in text1
// [SysCompareType::Move2, 'A\n', 1] Moved to here in text2 from
// position 1 in text1
//]
Community Additions
ADD
Show: