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

标签: , , , ,

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

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

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

微信赞赏支付宝赞赏

随机文章:

  1. VBS深入CreateObject函数
  2. 中兴F607ZA查看超级管理员密码
  3. Windows下编译支持IPv6的Apache
  4. Python pdfplumber内存泄露问题解决方案
  5. 迅雷中的VBS脚本

留下回复