这用于删除字符串的第一个和最后一个字符
@echo off set str=Batch scripts is easy. It is really easy echo %str% set str=%str:~1,-1% echo %str%
关于上述程序,需要注意的关键是〜1,-1用于删除字符串的第一个和最后一个字符。
链接:https://www.learnfk.comhttps://www.learnfk.com/batch-script/batch-script-remove-both-ends.html
来源:LearnFk无涯教程网
上面的命令产生以下输出。
Batch scripts is easy. It is really easy atch scripts is easy. It is really eas
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)