std::basic_string::replace

From Cppreference

Jump to: navigation, search
basic_string& replace( size_type pos1, size_type n1,
                       const basic_string& str );
(1)
basic_string& replace( size_type pos1, size_type n1,

                       const basic_string& str,

                       size_type pos2, size_type n2 );
(2)
basic_string& replace( size_type pos, size_type n1, const CharT* s,
                       size_type n2 );
(3)
basic_string& replace( size_type pos, size_type n1, const CharT* s );
(4)
basic_string& replace( size_type pos, size_type n1, size_type n2,
                       CharT c );
(5)
basic_string& replace( const_iterator i1, const_iterator i2,
                       const basic_string& str );
(6)
basic_string& replace( const_iterator i1, const_iterator i2, const CharT* s,
                       size_type n );
(7)
basic_string& replace( const_iterator i1, const_iterator i2, const CharT* s );
(8)
basic_string& replace( const_iterator i1, const_iterator i2,
                       size_type n, CharT c );
(9)
template< class InputIterator >

basic_string& replace( const_iterator i1, const_iterator i2,

                       InputIterator j1, InputIterator j2 );
(10)
basic_string& replace( const_iterator, const_iterator,
                       std::initializer_list<CharT> );
(11) (C++11 feature)

Contents

[edit] Parameters

[edit] Return value

*this

[edit] Exceptions

[edit] Example

[edit] See also