TrimRight
TrimRight removes elements having the value NANUM from the right end of a Curve.
int TrimRight( BOOL bDelExtra = FALSE )
Returns -1 on error, 0 on success, and N > 0 for number of cells deleted.
EX1
int curvebase_TrimRight_ex1(string wksName = "Book1") { Worksheet wks(wksName); if(wks) { Curve crv(wks,1); crv.TrimRight(TRUE); } return 0; }
EX2
int curvebase_TrimRight_ex2(string wksName = "Book1") { Worksheet wks(wksName); if(wks) { Curve crv(wks,1); out_int("Upper bound before trimright is: ",crv.GetUpperBound()); crv.TrimRight(); out_int("Upper bound after trimright is: ",crv.GetUpperBound()); } return 0; }
TrimRight removes elements having the value NANUM from the right end or bottom of the Curve by retarding the upper index to the last valid umeric value. When bDelExtra is TRUE TrimRight of Curve objects causes both X and Y Datasets to be trimmed.
curvebase::TrimLeft, vectorbase::GetUpperBound
origin.h