|
|
|
|
|
<ANSI string>.DeleteDuplicate (Function) In french: <Chaîne ANSI>.SupprimeDoublon Removes duplicates among substrings of a string, based on one or more separators. New in version 2025// Removes duplicates s is string s = "France, Italy, Germany, Spain, France" s.DeleteDuplicate(", ") // Returns "France, Italy, Germany, Spain"
Syntax
<Result> = <Initial string>.DeleteDuplicate(<Separator> [, <Comparison>])
<Result>: Character string String without duplicates. <Initial string>: Control name String with duplicates. <Separator>: String or array of strings This parameter can correspond to:- The string that separates the substrings. This separator is case sensitive.
- An array of strings. The different strings in the array delimit the substrings. These separators are case sensitive.
If this parameter is not specified, the default separator is TAB. <Comparison>: Optional integer Comparison options:
| | ccIgnoreAccent | Accent-insensitive comparison | ccIgnoreCase | Case-insensitive comparison. | ccIgnoreInsideSpace | Comparison ignoring spaces within strings. | ccIgnorePunctuationAndSpace | Space and punctuation-insensitive comparison. | ccIgnoreSpace | Comparison ignoring spaces before and after strings. | ccNormal (Default value) | Standard comparison, equivalent to the '=' operator. |
Remarks - In case of duplicates, only the first occurrence of the substring from the original string is kept in the result string.
- The characters taken into account for punctuation and spaces are provided by the system. To get the list of these characters, write the following WLanguage code:
s is string
FOR i = 0 TO 255
IF Charact(i) <> StringFormat(Charact(i), ccIgnorePunctuationAndSpace) THEN
s += Charact(i)
END
END
Info(s)
ToClipboard(s)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|