Having a string of whitespaces:
string *str = new string();
str->resize(width,' ');
I'd like to
fill length chars at a position.
In C it would look like
memset(&str[pos],'#', length );
How can i achieve this with c++ string, I tried
string& assign( const string& str, size_type index, size_type len );
but this seems to truncat the original string.
Is there an easy C++ way to do this?
Thanks.