0
我正在使用Autohotkey。在Autohotkey中删除特定字符后的字符
我有这个字符串变量ABCDEF.XX
。我想通过去除.
之后的字符(包括.
本身)将其转换为ABCDEF
。
inputVar:="ABCDEF.XX"
StringTrimRight, inputVar, inputVar, 3
如果我想让代码识别点的位置,该怎么办?并相应地删除字符。如何才能做到这一点?
我正在使用Autohotkey。在Autohotkey中删除特定字符后的字符
我有这个字符串变量ABCDEF.XX
。我想通过去除.
之后的字符(包括.
本身)将其转换为ABCDEF
。
inputVar:="ABCDEF.XX"
StringTrimRight, inputVar, inputVar, 3
如果我想让代码识别点的位置,该怎么办?并相应地删除字符。如何才能做到这一点?
inputVar:="ABCDEF.XX"
StringSplit, input_array, inputVar, .
MsgBox, %input_array1%
https://autohotkey.com/docs/commands/StringSplit.htm#Examples
或
FileName :="ABCDEF.XX"
SplitPath, FileName,,,,name_no_ext
MsgBox, %name_no_ext%
https://autohotkey.com/docs/commands/SplitPath.htm
或
Remove last n characters of string after the dot with Autohotkey