![]() |
Trading System API
3.0
Library for Simulating and Deploying Trading and Investment Strategies
|
Support class for splitting 'record' strings into 'fields' using separator characters such as ','. More...
#include <TSAFile.h>
Public Member Functions | |
string_splitter (void) | |
Constructor. | |
virtual | ~string_splitter (void) |
Destructor. | |
const variant & | operator[] (size_t index) const |
Returns a Variant object, of type string corresponding to the field found at index. | |
size_t | size (void) const |
Returns the number of fields found in the string that was split, which also equals the size of the Variant array containing the field values. | |
size_t | split (const char *string_to_split, char separator) |
Splits string_to_split using a separator character such as ','. More... | |
![]() | |
object (void) | |
Constructor. | |
virtual | ~object (void) |
Destructor. | |
const char * | class_name (void) const |
Returns the class name as returned by the 'Real Time Type Information' (RTTI) mechanism. More... | |
bool | has_same_class_as (const object &other) const |
Returns true if self has the same type as other object. More... | |
Support class for splitting 'record' strings into 'fields' using separator characters such as ','.
size_t tsa::string_splitter::split | ( | const char * | input_str, |
char | sep | ||
) |
Splits string_to_split using a separator character such as ','.
If stringToSplit contains two consecutive separator characters, then they are considered to delimit an empty field. Likewise, if a separator is the first or last character in stringToSplit, an empty field is assumed to exist in first or last position!