in reply to joining string content
i dont want to use array
Why not? An array seems like precisely the right thing to use here.
Update: Is this an XY Problem? What are you actually trying to do in the bigger picture?
🦛