联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@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!%%
for %%a in ("0=零" "1=一" "2=二" "3=三" "4=四" "5=五" "6=六" "7=七" "8=八" "9=九") do call set str=%%str:%%~a%%
@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%