{NeoBook Function}
Version=5.80
Language=NeoBook
Param=[rmInStr]|Text|the original string (with possible duplicate characters]
Param=[rmOutStr]|Variable|the variable where the unique string is to be returned
{End}
. rmRemoveDuplicates
.takes a string passed in the first parameter
. returns a string with just one instance of each character in variable specified in second parameter
. original script developed by Reinier Maliepaard
. use of the code inside a VisualNEOWin Function further reduces the lines of code required from the developer
SetVar "[rmOutStr]" ""

StrLen "[rmInStr]" "[len_rmInStr]"
... loop through each character
Loop "1" "[len_rmInStr]" "[this_rmInStrNumber]"
 SubStr "[rmInStr]" "[this_rmInStrNumber]" "1" "[this_rmInStrChar]"
 ... check if found before
 SearchStr "[this_rmInStrChar]" "[rmOutStr]" "[this_rmInStrCharFound]" ""
 If "[this_rmInStrCharFound]" "=" "0"
  ... no; add to out string
  SetVar "[rmOutStr]" "[rmOutStr][this_rmInStrChar]"
 EndIf
EndLoop
.result: [rmOutStr] contains the value 'axbedg'
