码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2014-11-11 21:13:45      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:style   io   sp   strong   on   bs   size   nbsp   c   

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


@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%

 


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

标签:style   io   sp   strong   on   bs   size   nbsp   c   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!