使用 MS-DOS 8.0,确定字符串长度的最佳方法是什么?
我浏览了 Computer Hope (http://www.computerhope.com/msdos.htm),但没有命令跳到我...
是否有内置命令或必须构建函数来解决这个问题?
非常感谢。
最佳答案
来自 here我得到了一个例子,这是它清理了一点
@echo off
setlocal
set #=%1
set length=0
:loop
if defined # (set #=%#:~1%&set /A length += 1&goto loop)
echo %1 is %length% characters long!
endlocal
关于string - MS-DOS 8.0 : Determine String Length?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4103134/