AppCtrlScript

MAY Computer

Help

STRCOLLECT

Applies to  

AppCtrlScript (Module: wmACScr1.dll)

Group  

String

See also  

DIM, STRSPLIT, FOREACHLINEINFILE, REMOVEVALS

Build a string from several script variables combining them by putting the specified separation characters between the single items. This method can be used for example to combine sevaral values to a comma separated string.

 

Syntax

[STR]COLLECT <VariableName>[, <VariablePrefix>][, <SepStr>][, <SkipEmpty>][, <AllUntil>]
COLLECT[STR] <VariableName>[, <VariablePrefix>][, <SepStr>][, <SkipEmpty>][, <AllUntil>]

Part

Description

<VariableName> Script variable to store combined resultstring into.
<VariablePrefix> All variables starting with <VariablePrefix> will be combined together.
<String> String to be splitted.
<SepStr> Separation character or string. If missing then ";" character is assumed.
<SkipEmpty> 0|1; if 1 then empty string parts are skipped. Default is 0.
<AllUntil>

0|1; if 1 then part2 will be part1+2, part3 will be part1+2+3 and so on.

 

 

Sample

SUB MAIN
  SETVAL Test, "MyPart1;MyPart2;MyPart3"
  STRSPLIT Splitted_, %SCR.Test%, ";"
  STRCOLLECT Combined, Splitted_, %CRLF%
  REMOVEVARS Splitted_
END
SUB