bool getRange ( const string& s, int* start, int* end, bool* isRange)

Assume the string s contains an integer or a number range between two integers, e

Documentation

Assume the string s contains an integer or a number range between two integers, e.g. 20 or 23-45. Returns: If string s contains only a single integer, it is returned in start variable and isRange is set to false, and the function in whole returns true. If string s contains a range, start variable will contain the starting number, and end variable will contain the ending number, and isRange is set to true if the range is valid, i.e. start < end. the function in whole returns true. Any other case, the function returns false.

alphabetic index hierarchy of classes


generated by doc++