Subversion Repositories spk

Rev

Rev 109 | Rev 126 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 109 Rev 121
Line 144... Line 144...
144
{
144
{
145
	return atoi(this->c_str()) ? true : false;
145
	return atoi(this->c_str()) ? true : false;
146
}
146
}
147
long String::toLong() const
147
long String::toLong() const
148
{
148
{
-
 
149
	return static_cast<long>(atoi(this->c_str()));
-
 
150
}
-
 
151
int String::toInt() const
-
 
152
{
149
	return atoi(this->c_str());
153
	return static_cast<int>(atoi(this->c_str()));
150
}
154
}
151
double String::toDouble() const
155
double String::toDouble() const
152
{
156
{
153
	return atof(this->c_str());
157
	return atof(this->c_str());
154
}
158
}
Line 297... Line 301...
297
		if ( to == 0 )
301
		if ( to == 0 )
298
		{
302
		{
299
			if ( whichtok >= from )
303
			if ( whichtok >= from )
300
			{
304
			{
301
				if ( newstr != "" ) newstr = newstr + token;
305
				if ( newstr != "" ) newstr = newstr + token;
302
				newstr = newstr + this->substr(lastPos, pos - lastPos);
306
				newstr = newstr + Utils::String(this->substr(lastPos, pos - lastPos));
303
			}
307
			}
304
		}
308
		}
305
		else
309
		else
306
		{
310
		{
307
			if ( (whichtok >= from) && (whichtok <= to) )
311
			if ( (whichtok >= from) && (whichtok <= to) )
308
			{
312
			{
309
				if ( newstr != "" ) newstr = newstr + token;
313
				if ( newstr != "" ) newstr = newstr + token;
310
				newstr = newstr + this->substr(lastPos, pos - lastPos);
314
				newstr = newstr + Utils::String(this->substr(lastPos, pos - lastPos));
311
			}
315
			}
312
			if ( whichtok > to )
316
			if ( whichtok > to )
313
				break;
317
				break;
314
		}
318
		}
315
		// Found a token, add it to the vector.
319
		// Found a token, add it to the vector.
Line 345... Line 349...
345
	while (Utils::String::npos != pos || Utils::String::npos != lastPos)
349
	while (Utils::String::npos != pos || Utils::String::npos != lastPos)
346
	{
350
	{
347
		if ( whichtok != from )
351
		if ( whichtok != from )
348
		{
352
		{
349
			if ( newstr != "" ) newstr = newstr + token;
353
			if ( newstr != "" ) newstr = newstr + token;
350
			newstr = newstr + this->substr(lastPos, pos - lastPos);
354
			newstr = newstr + Utils::String(this->substr(lastPos, pos - lastPos));
351
		}
355
		}
352

356

353
		// Found a token, add it to the vector.
357
		// Found a token, add it to the vector.
354
		whichtok++;
358
		whichtok++;
355

359

Line 647... Line 651...
647
			newstr = newstr + replace;
651
			newstr = newstr + replace;
648
		}
652
		}
649
		else
653
		else
650
		{
654
		{
651
			if ( newstr != "" ) newstr = newstr + token;
655
			if ( newstr != "" ) newstr = newstr + token;
652
			newstr = newstr + this->substr(lastPos, pos - lastPos);
656
			newstr = newstr + Utils::String(this->substr(lastPos, pos - lastPos));
653
		}
657
		}
654

658

655
		// Found a token, add it to the vector.
659
		// Found a token, add it to the vector.
656
		whichtok++;
660
		whichtok++;
657

661