Plug-in Reference — Structures — MANAGE_DUPLICATES_INFO

# MANAGE_DUPLICATES_INFO

Used by EE_MANAGE_DUPLICATES messages.

    typedef struct _MANAGE_DUPLICATES_INFO {
    	UINT nVer;
    	UINT nFlags;
    	INT_PTR nFound;
    	int nNumOfColumns;
    	int* anColumns;
    	int nNumOfColumnsToCombine;
    	int* anColumnsToCombine;
    	LPCWSTR pszInsert;
    	UINT nCombineFlags;
    	LPCWSTR pszLocale;
    } MANAGE_DUPLICATES_INFO;

## Fields

nVer

Specifies the version of this structure. Must specify VER_MANAGE_DUPLICATES_INFO.

nFlags

Specifies a combination of the following values.

MANAGE_DUPLICATES_ADJACENT_ONLY | Inspects only adjacent lines. This flag is useful if the document has been already sorted.
MANAGE_DUPLICATES_BOOKMARK | Bookmarks duplicate lines. If this flag is not specified, the message deletes the duplicate lines.
MANAGE_DUPLICATES_COMBINE | Combines vertical adjacent duplicate cells of the CSV document.
MANAGE_DUPLICATES_IGNORE_CASE | Ignores case.
MANAGE_DUPLICATES_IGNORE_EMPTY_CELLS | Ignores all the empty cells when deleting or bookmarking duplicate lines in CSV documents. When multiple columns are specified, all cells in the specified columns must be empty in order to be ignored.
MANAGE_DUPLICATES_IGNORE_EMPTY_LINES | Ignores all the empty lines when deleting or bookmarking duplicate lines.
MANAGE_DUPLICATES_INCLUDE_ALL | Deletes or bookmarks all lines of each duplicate.
MANAGE_DUPLICATES_INSPECT_SEL_ONLY | Inspects only the selected strings when vertical selection or multiple selections exist.
MANAGE_DUPLICATES_SELECTION_ONLY | Inspects only the selected lines.

nFound

The function sets the number of the lines deleted or bookmarked (including lines already bookmarked).

nNumOfColumns

Specifies the number of columns specified in the anColumns field. If this is zero, the whole lines are inspected.

anColumns

Specifies the array of zero-based indexes of columns to be inspected for duplicate lines. This field can be NULL if the nNumOfColumns field is 0.

nNumOfColumnsToCombine

Specifies the number of columns specified in the anColumnsToCombine field.

anColumnsToCombine

Specifies the array of zero-based indexes of columns to be combined. This field can be NULL if the nNumOfColumnsToCombine field is 0.

pszInsert

Specifies the string to insert when combining vertical adjacent duplicate cells of the CSV document.

nCombineFlags

You can specify a combination of the following values. SORT_ENABLED must be specified to sort strings, and combine with other flags to specify the sort behavior. SORT_DELETE_DUPLICATE must be specified to remove duplicate strings.

Value | Meaning
--- | ---
NORM_IGNORECASE | Case is ignored.
NORM_IGNOREKANATYPE | Hiragana and Katakana characters compare as equal.
NORM_IGNORENONSPACE | Nonspacing characters are ignored.
NORM_IGNORESYMBOLS | Symbols are ignored.
NORM_IGNOREWIDTH | The difference between half-width and full-width characters is ignored.
SORT_BINARY_COMPARISON | Fast binary comparison is used to sort. The locale information is ignored.
SORT_DATE | Sorts date and time.
SORT_DELETE_DUPLICATE | Removes duplicate strings.
SORT_DIGITSASNUMBERS | Digits are sorted as numbers even when sorted by alphabetical order.
SORT_ENABLED | Sorts split strings.
SORT_IGNORE_PREFIX | Leading non-numeric characters are ignored when using Sort Smallest to Largest or Sort Largest to Smallest commands.
SORT_IPV4 | Sorts IPv4 addresses.
SORT_IPV6 | Sorts IPv6 addresses.
SORT_LENGTH | Sorts strings by the number of characters.
SORT_LENGTH_VIEW | Full width characters are treated as 2 characters when using Sort Shortest to Longest or Sort Longest to Shortest commands.
SORT_NUM | Sorts numbers.
SORT_GROUP_IDENTICAL | Groups identical strings when sorted by occurrence. Must be specified with SORT_OCCURRENCE.
SORT_OCCURRENCE | Sorts by occurrence.
SORT_RANDOM | Sorts randomly.
SORT_REMOVE_EMPTY | Removes empty strings.
SORT_REVERSE | Sorts in reverse order.
SORT_STABLE | Stable sort is used. The stable sort maintains the relative order of records. The stable sort is usually slower.
SORT_STRINGSORT | Punctuation marks are treated the same as symbols.
SORT_TEXT | Sorts text.
SORT_WORDS | Sorts strings by the number of words.

pszLocale

Specifies the locale used to sort. If this is empty, the locale specified in the Customize dialog box is used.

## Version

Supported on EmEditor Professional Version 16.4 or later.