VBS实现全角字符转半角字符

标签: , , , ,

既然有《VBS实现半角字符转全角字符》,当然也有VBS实现全角字符转半角字符。

url = "http://demon.tw"
WScript.Echo url
WScript.Echo Full2Half(url)

Function Full2Half(ByVal s)
    'By Demon
    'http://demon.tw
    Dim i
    For i = &HFF01 To &HFF7E
        s = Replace(s, ChrW(i), ChrW(i - &HFEE0))
    Next
    Full2Half = s
End Function

随机文章:

  1. VBS基础教程第二篇
  2. 价值50大洋的VBS脚本
  3. JavaScript Unicode UTF-8
  4. /DYNAMICBASE链接选项
  5. VBS也玩验证码识别

留下回复