Inserting a character in the beginning of a string

Revision en1, by Qualified, 2020-05-21 00:02:22

I would always do if I wanted to insert 'a' into the beginning of the string. reverse(s.begin(), s.end()); s += 'a'; reverse(s.begin(), s.end()); Is there a built-in function to insert a character in the beginning of a string?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Qualified 2020-05-21 00:02:22 301 Initial revision (published)