Error Message :
Documentation for the Script Function :STR_SPLIT when using multiple separators is not clear.
Using the function to split "A...B..C.D" using a . (dot) as the separator, the resulting array looks like:
For "...B....C" it looks like:
&ARRAY# = B
&ARRAY# = C
Unlike in other script languages, multiple separators are not treated as one and there is no option to enable them to be treated as one. Also, the documentation it is not clear as to what happens in case of leading or trailing separators.
In the fix versions below the following text has been added to the documentaiton for the STR_SPLIT script function.
When multiple separator characters are used in a row, the STR_SPLIT script function creates empty strings for the second separator and all subsequent separators.
When a string begins with one or more separator characters, the STR_SPLIT script function creates empty strings for them.
Automation Engine Script Guide > Ordered by Function > Strings > STR_SPLIT
Root Cause: Additional information about separator characters needed to be added to the documentation.
Release: AUTWAB99000-11.0-Automic Workload Automation-Base Edition
This field was added on 30/03/2017. This article has not been updated yet. Refer to the "Description" or "Workaround" sections for solution information.
Fix Status: Released
Automation Engine 11.2.2 - Available
Automation Engine 11.1.3 - Available
Automation Engine 10.0.8 – Available
Example for removing double entries using script::set &STRING# = STR_TRIM(&STRING#):set &wiederholung# = "J":WHILE &wiederholung# = "J": set &STRING# = STR_SUBSTITUTE(&STRING#, " ", " "): set &doppelblank# =STR_FIND(&STRING#," "): if &doppelblank# = 0: set &wiederholung# = "N": endif:ENDWHILE