xpfSplitStringToAggregate

FUNCTION xpfSplitStringToAggregate(str             : STRING;
                                   options         : INTEGER;
                                   stringDelimiter : STRING;
                                   stringPrefix    : STRING;
                                   stringSuffix    : STRING;
                                   listId          : LIST OF GENERIC;
                                   elementIndex    : INTEGER)
                                   resultListId    : LIST OF GENERIC;
                

Function that splits a string into an aggregate of strings. This function has variable number of arguments, i.e., it can be invoked with minimum 1 argument and maximum 7 arguments.

 

Arguments


1TypeNameComment
2
STRING
str
The actual string that will be split into aggregate elements.
3
INTEGER
optionsOptional argument. Default value is options = 0.
4
STRING
stringDelimiterOptional argument. Default value is ' ' (white space). Specifies the delimiter between each substring in the actual "str" string. The string delimiter will be removed in the string splitting operation.
5
STRING
stringPrefixOptional argument. Default value is INDETERMINATE (?). Specifies the prefix of each substring. This prefix will be removed in the string splitting operation.
6
STRING
stringSuffixOptional argument. Default value is INDETERMINATE (?). Specifies the suffix of each substring. This suffix will be removed in the string splitting operation.
7
LIST OF GENERIC
listIdOptional argument. Default value is INDETERMINATE (?)
8
INTEGER
elementIndexOptional argument. Default value is INDETERMINATE (?). Specifies the index in the resulting "listId" aggregate that will be populated with the first element from the string splitting operation. The default is that the first element will be appended to the existing aggregate "listId". This argument has no effect when the argument "listId" is not specified.

Return Value


 

TypeNameComment
LIST OF GENERICresultListIdThe resulting aggregate of strings will be returned when the function is successfully performed. When a new aggregate is created as the result aggregate, this will be a LIST aggregate. The value INDETERMINATE (?) will be returned when the function fails. Exception handling should be used to handle error conditions in the actual xpfSplitStringToAggregate() operation.

Options


 OptionComment
1XPXINTEGER_AGGRThe substring of "str" will be transferred into an integer element, i.e., the resulting aggregate will be an aggregate of INTEGER. It is assumed that each substring is a string of digits.
2XPXINSTANCE_AGGRThe substring of "str" will be transferred into an instance element, i.e., the resulting aggregate will be an aggregate of GENERIC (instanceIds). It is assumed that each substring is a string of digits.
3XPXAPPEND_STRINGSAppend the elements from the split string into the aggregate specified in the "listId" argument. Hence, this option is only effective when the argument "listId" is specified.
4XPXPREPEND_STRINGSPrepend the elements from the split string into the aggregate specified in the "listId" argument.Hence, this option is only effective when the argument "listId" is specified.
5XPXSCRATCH_AGGR

The new created resultListId will be a scratch aggregate instead of a volatile aggregate.

 

Example


<Missing Example>

 

See also

Filter by label

There are no items with the selected labels at this time.

Â