on-internet
← Community

Batch-File Substituting an entire string for one character

Stack Overflow ·

For one of the games I was working on, I wrote a script that works universally across all my projects and functions as a selector/selection menu. My issue, is that I wanted to display a neat little title bar that would be the same length as the text (output example): ================== ## EXAMPLE TEXT ## ================== But most importantly, I wanted to make sure that whatever text I substituted in would always be the same length as whatever variable I set it to. set "exampleVariable=this would be the variable content" ::Line example echo ======================= echo ## %exampleVariable% ##

Comments

Sign in or sign up to comment and upvote.

No comments yet.