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. VB6拾遗:轻量级COM对象
  2. WMI中的Win32_PingStatus类
  3. 未能正确加载“Microsoft.VisualStudio.Editor.Implementation.EditorPackage”包(续)
  4. 用EnumSystemCodePages函数枚举系统代码页
  5. Python牛刀小试

留下回复