BMXNET 4.0 Developer API
M-like utility method to answer the piece at a 1-based offset. Corresponds to M's $$Piece function
Namespace:
IndianHealthService.BMXNetAssembly: BMXNET40 (in BMXNET40.dll)
Syntax
C# | Visual Basic | Visual C++ |
Parameters
- thePieces
- String
Delimited input string e.g. one^two^three
- aDelimiter
- String
Delimiter character or string, commonly ~ ^ or |
- nthPiece
- Int32
The 1-based index of the piece
Return Value
The piece at the index, or an empty string if the index is higher than the explicit number of piecesExamples
Copy Code | |
---|---|
String demographics="DOE,JOHN~555-55-5555~34~M"; int age=0; if (int.TryParse(M.Piece(demographics,"~",3), out age)) { System.Console.Writeln(M.Piece(demographics,"~",1)+" is "+ (age >= 18 ) ? "an adult" : "a child"); } |