void Xclass::zapper(int *alf, string& zap) { /*TRIMS INVALID CHARACTERS*/
string trim;
if (alf[0]==1) trim = ".. \n\t"; //for int
else if(alf[1]==1) trim = " \n\t"; //for float
else {
switchBlade(444);
return;
}
// cout<<"\n\tzap: before "<<zap;
int i {};
while ((i = zap.find_first_of(trim)) != -1) zap.erase(i,1);
// cout<<" after "<<zap<<endl;
};
Comments