mardi 10 novembre 2020

Adding spaces between characters in string C++

I am looking for the most efficient way to add a space " " between every character in the string in C++.

So let's say I pass a string "123" and I want to get "1 2 3 " or "1 2 3" (it doesn't really matter).

Does anyone know the fastest way of doing such a thing? Thanks

Aucun commentaire:

Enregistrer un commentaire