开发者

Batch file string modification

开发者 https://www.devze.com 2023-03-25 22:21 出处:网络
If I had the following code: set alpha=abcdefghijklmnopqrstuvwxyz What would I have to 开发者_StackOverflow社区do to %alpha% in order to result in only a, b, c, . . ., z? If you want to access it v

If I had the following code:

set alpha=abcdefghijklmnopqrstuvwxyz

What would I have to 开发者_StackOverflow社区do to %alpha% in order to result in only a, b, c, . . ., z?


If you want to access it via the position you need

set alpha=abcdefghijklmnopqrstuvwxyz
echo %alpha:~0,1%
echo %alpha:~1,1%
echo %alpha:~2,1%
echo %alpha:~25,1%

Explained at set /?

0

精彩评论

暂无评论...
验证码 换一张
取 消