
CODE: [Copy to clipboard]@echo off
setlocal EnableDelayedExpansion
set mystr=8008109999
set str1=0123456789
set str2=零一二三四五六七八九
for /l %%b in (0,1,9) do (
call :convent %%b
)
echo %mystr%
endlocal
pause&goto :eof
:convent
call set mystr=%%mystr:!str1:~%1,1!=!str2:~%1,1!%%
CODE: [Copy to clipboard]for %%a in ("0=零" "1=一" "2=二" "3=三" "4=四" "5=五" "6=六" "7=七" "8=八" "9=九") do call set str=%%str:%%~a%%
CODE: [Copy to clipboard]@echo off
set str=157924680
for %%a in ("0=零" "1=一" "2=二" "3=三" "4=四" "5=五" "6=六" "7=七" "8=八" "9=九") do call set str=%%str:%%~a%%
echo %str%
set str=abcdehijkl
for %%a in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do call set str=%%str:%%a=%%a%%
echo %str%
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |