BMXNET 4.0 Developer API

M-like utility method to answer the number of pieces limited by aDelimiter. Corresponds to M's $L(STRING,DELIMITER)

Namespace:  IndianHealthService.BMXNet
Assembly:  BMXNET40 (in BMXNET40.dll)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static int PieceLength(
	string thePieces,
	string aDelimiter
)
Public Shared Function PieceLength ( _
	thePieces As String, _
	aDelimiter As String _
) As Integer
public:
static int PieceLength(
	String^ thePieces, 
	String^ aDelimiter
)

Parameters

thePieces
String
Delimited input string e.g. one^two^three
aDelimiter
String
Delimiter character or string, commonly ~ ^ or |

Return Value

Count of pieces in thePieces delimited by aDelimiter

Examples

Copy Code
                String team="DOE,JOHN^SMITH, PETER^JONES, SALLY";
                if (M.PieceLength(team,"~") >=5 ) {
                    this.PlayBasketBall();
                } 
                else 
                {
                    this.PlayTrackAndField();
                }
            

See Also