
- 帖子
- 2
- 积分
- 13
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2018-5-1
|
A1:
@echo off
echo 分隔符1:逗号
for %%i in (I,LOVE,BBS,BATHOME,NET) do echo %%i
echo ____________________________________________
echo 分隔符2:分号
for %%i in (I;LOVE;BBS;BATHOME;NET) do echo %%i
echo ____________________________________________
echo 分隔符3:等号
for %%i in (I=LOVE=BBS=BATHOME=NET) do echo %%i
echo ____________________________________________
echo 分隔符4:跳格键
for %%i in (I LOVE BBS BATHOME NET) do echo %%i
echo ____________________________________________
echo 分隔符5:空格
for %%i in (I LOVE BBS BATHOME NET) do echo %%i
echo ____________________________________________
echo 非分隔符:点
for %%i in (I.LOVE.BBS.BATHOME.NET) do echo %%i
echo ____________________________________________
pause
A2:
@echo off
set str=I,LOVE,BBS,BATHOME,NET
for %%i in (%str%) do (set a=%%i)
echo %a%
pause |
|