gougjp 当前离线
列兵
@echo off echo ++++++++++++ call :upcase "test1" teststr1 echo %teststr1% echo ++++++++++++ :eof echo end exit /b 0 :upcase setlocal enabledelayedexpansion & set "str=%1" 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 set "str=!str:%%a=%%a!" endlocal & set "%2=%str%"复制代码
foxJL 当前离线
荣誉版主
@echo off&setlocal enabledelayedexpansion set/p str=输入: echo ++++++++++++ call :upcase echo !str! echo ++++++++++++ pause exit :upcase 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 set str=!str:%%a=%%a! goto :eof复制代码
TOP
PowerShell (powershell传教士)当前离线
上尉
"aBc".toupper()复制代码