ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / String functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Removes duplicates among substrings of a string, based on one or more separators.
Example
// Removes duplicates
StringDeleteDuplicate("France, Italy, Germany, Spain, France", ", ")
// Returns "France, Italy, Germany, Spain"
Syntax
<Result> = StringDeleteDuplicate(<Initial string> , <Separator> [, <Comparison>])
<Result>: Character string
String without duplicates.
<Initial string>: Character string
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:
ccIgnoreAccentAccent-insensitive comparison
ccIgnoreCaseCase-insensitive comparison.
ccIgnoreInsideSpaceComparison ignoring spaces within strings.
ccIgnorePunctuationAndSpaceSpace and punctuation-insensitive comparison.
ccIgnoreSpaceComparison 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)
Component: wd300vm.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/10/2024

Send a report | Local help