in reply to Re^2: Can we "grow" a string?
in thread Can we "grow" a string?

Well, I have been dealing with this problem quite some days now, and it works OK...
Except something I found out today:
Both in the initial code and in this one, there is a bug and I don't know how to deal with it:
Check for instance the initial code you provided citromatik:
If the substring is NO, the final output is KLMNOP, that is, it doesn't take J as well so as to become 7, which is the wanted final length.