axyd icon

C++ Remove Spaces and Dots

axyd | PRO | 10/21/16 02:04:31 AM UTC | 0 ⭐ | 728 👁️ | Never ⏰ | []
C++ |

370 B

|

None

|

0 👍

/

0 👎

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