Assigns a string, Null Terminated Character Type Sequence or char type to the string.
basic_string& assign(const basic_string&); basic_string& assign (const basic_string& str,size_type pos, size_type n); basic_string& assign(const charT* s, size_type n); basic_string& assign(const charT* s); basic_string& assign(size_type n, charT c); template<class InputIterator> basic_string& assign(InputIterator first, InputIterator last);
If there is a size argument whichever is smaller the string size or argument value will be assigned.