首页 > 其他 > 详细

批处理命令:带参数的字符串替换

时间:2014-11-11 21:11:53      阅读:330      评论:0      收藏:0      [点我收藏+]

批处理命令:带参数的字符串替换


@echo off

setlocal enabledelayedexpansion
set main_str=hello world
set src=hello
set dst=hi
echo %main_str%
set sub_str=!main_str:%src%=%dst%!
echo %sub_str%

 


批处理命令:带参数的字符串替换

原文:http://blog.csdn.net/wjj715211/article/details/41015729

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!