Thread
:
Place a char before every char
View Single Post
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
05-17-2018 , 15:02 Re: Place a char before every char
#
3
If you're going to loop over all the characters of the input, you don't want to
Format
every time. You only need to do two character assignments as you go along:
out[i * 2] = separator
and
out[i * 2 + 1] = input[i]
.
Also,
Format
is able to use the same buffer for both input and output.
Last edited by Fyren; 05-17-2018 at
15:03
.
Fyren
View Public Profile
Send a private message to Fyren
Find More Posts by Fyren