这是我最初的解,只能就题解题而已。- @echo off&setlocal enabledelayedexpansion
- set "str=i like the bathome,because here is the batch of the world. "
- call :loop
- endlocal
- set "str=%%a%%!ver!&^^^ ^*~ are you o k ?" : \ / ` ` verfdxcweippo opj x ds gw !%%"
- setlocal enabledelayedexpansion
- set "str=!str:%%=%%%%!"
- :loop
- if defined str set/a n+=1&set "str=!str:~1!"&goto loop
- echo %n%
- pause>nul
复制代码 shqf的方法高明,放于自身批处理中。
[ 本帖最后由 pusofalse 于 2008-8-16 08:01 编辑 ] |