AppCtrlScript

MAY Computer

Help

STRPARTS

Applies to  

AppCtrlScript (Module: wmACScr1.dll)

Group  

String

See also  

STRPART, STRFIRSTPART, STRLASTPART, STRSTRIPFIRSTPART, STRSTRIPLASTPART

Retrieves the number of items (substrings) in a string by using the given separation string.

The minimum number of items is 1 because an empty string is assumed to be an empty item.

Syntax

STRPARTS <VariableName>, <String>[, <SepStr>] 

Part

Description

<VariableName> Name of the script variable where to store the number of substrings.
<String> Source string.
<SepStr> Optional substring that separates the different items. If missing the program tries to find a fitting character like |, /, \, ., ,, ; (the first of these that can be found somewhere in the string is assumed to be the separation character).

 

Sample

STRPARTS Count, "mwildam@may.co.at;useeliger@may.co.at", ";"
;Result in Count will be 2