- 批处理脚本教程
- 批处理脚本 - 主页
- 批处理脚本 - 概览
- 批处理脚本 - 环境
- 批处理脚本 - 命令
- 批处理脚本 - 文件
- 批处理脚本 - 语法
- 批处理脚本 - 变量
- 批处理脚本 - 注释
- 批处理脚本 - 字符串
- 批处理脚本 - 数组
- 批处理脚本 - 决策
- 批处理脚本 - 运算符
- 批处理脚本 - DATE 和 TIME
- 批处理脚本 - 输入/输出
- 批处理脚本 - 返回代码
- 批处理脚本 - 函数
- 批处理脚本 - 进程
- 批处理脚本 - 别名
- 批处理脚本 - 设备
- 批处理脚本 - 注册表
- 批处理脚本 - 网络
- 批处理脚本 - 打印
- 批处理脚本 - 调试
- 批处理脚本 - 日志记录
- 批处理脚本资源
- 批处理脚本 - 快速指南
- 批处理脚本 - 有用资源
- 批处理脚本 - 讨论
批处理脚本 - 删除两端
这用于删除字符串的首尾字符
示例
@echo off set str = Batch scripts is easy. It is really easy echo %str% set str = %str:~1,-1% echo %str%
对于上面的程序,需要注意的是,~1,-1 用于删除字符串的首尾字符。
输出
上述命令产生以下输出。
Batch scripts is easy. It is really easy atch scripts is easy. It is really eas
batch_script_strings.htm
广告