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. ActivePython PyPM error: (OperationalError) unable to open database file None None
  2. VBS打开选择文件对话框(Windows 7)
  3. VBS加密 & VBE解密
  4. PHP调用COM组件
  5. NDS模拟器NO$GBA

留下回复