while(!finished)
while(!finished&&i<len)
string demunge_ocstring(const string &asmstr, const vector<string> &param_types, const vector<unsigned int> &params, const UCc &op){	strstream str;	str << setfill('0') << setbase(16);	str.setf(ios::uppercase);	if(asmstr.size()==0) return string(); // for the degenerate case	bool finished=false; // terminating details are at end-of-while  unsigned int i=0; // istr index	unsigned int width=0; // width value for setw()	while(!finished)	{		char c = asmstr[i];		switch(c)		{			case '\\':				i++;				c = asmstr[i];				switch(c)				{					case '\\': str << '\\'; break;					case 'n':  str << '\n'; break;					case 't':  str << '\t'; break;					case '\'': str << '\''; break;					case '"':  str << '\"'; break;					case 'b':  // bell is invalid					default:   // we'll silently drop errors... it's the only "clean" way						str << '\\' << c;				}				break;			case '%':				{					i++;					c = asmstr[i];					// if it's a "byte" set width to 2, and get the next char					if(c=='b')      { i++; c = asmstr[i]; width=2; }					// if it's a "short" set width to 4, and get the next char					else if(c=='s') { i++; c = asmstr[i]; width=4; }					// width defaults to 4 if it's not specified					else            width=4;										switch(c)					{						case '%': str << '%'; break;						case '1': assert(params.size()>=1); str << setw(width) << params[0]; break;						case '2': assert(params.size()>=2); str << setw(width) << params[1]; break;						case '3': assert(params.size()>=3); str << setw(width) << params[2]; break;						case '4': assert(params.size()>=4); str << setw(width) << params[3]; break;						case '5': assert(params.size()>=5); str << setw(width) << params[4]; break;						case '6': assert(params.size()>=6); str << setw(width) << params[5]; break;						case '7': assert(params.size()>=7); str << setw(width) << params[6]; break;						case '8': assert(params.size()>=8); str << setw(width) << params[7]; break;						case '9': assert(params.size()>=9); str << setw(width) << params[8]; break;						default:   // we'll silently drop errors... it's the only "clean" way							str << '%' << c;					}				}				break;			default: // it's just a character, leave it be				str << c;		}		i++;    if(i==asmstr.size()) finished=true;	}	str << ends;  return str.str();}