|
|
От: |
Glоbus
|
|
| Дата: | 21.12.04 14:25 | ||
| Оценка: | |||
#include <string>
void replace( const std::string& _src, const std::string& _with, std::string& _res )
{
size_t pos = _src.find( '.', 0 );
if( pos != std::string::npos )
{
_res = _with + _src.substr( pos, _src.length() - pos );
}//if
}
int main()
{
std::string result;
replace( "123.456", "000", result );
}