I have char array(vector) of chars and I want to insert white spaces in specific order.
For example I have
['A','B','C','D','E','F','G','H','J','K','L','M','N','O']
and vector with indexes of white spaces
[7 12] % white spaces should be add to 7 and 12 indexes (original string)
and want to have
['A','B','C','D','E','F',' ','G','H','J','K', 'L', ' ','M','N','O']
Is there some build-in function? I started with nested loop to itarate the array and instert ' ', but it looks ugly.