Assignment Operator

Assigns the input string, char array or char type to the current string.

  basic_string& operator= (const basic_string& str);
  

If *this and str are the same object has it has no effect.

  basic_string& operator=(const charT* s);
  

Used to assign a NCTCS to a string.

  basic_string& operator=(charT c);
  

Used to assign a single char type to a string.