parse a row range portion of a range string to break down to its components. Caller must initialize all output arguments to i1=-1 and bAuto1 = false etc.
BOOL okutil_parse_row_range( LPCSTR lpcszRowrange, int * pi1, BOOL * pbAuto1, int * pi2, BOOL * pbAuto2 )
false if lpcszRowrange is not empty and does not conform to standard row range string notation
EX1
void okutil_parse_row_range_ex1() { string strRange =" [1:4*] "; BOOL pbAuto1 = false; BOOL pbAuto2 = false; int pi1 = -1; int pi2 = -1; bool bRet = okutil_parse_row_range(strRange, &pi1, &pbAuto1, &pi2 , &pbAuto2); if(bRet) { if(pbAuto1) printf("beginning part of row range is auto \n"); if(pbAuto2) printf("ending part of row range is auto \n"); printf("the rows range from %d to %d (0 offset)\n" , pi1 , pi2); } }
origin.h