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实现繁体中文和简体中文转换
  2. 用C语言实现PHP的base64_encode函数
  3. WordPress回复可见插件Easy2Hide
  4. OpenWrt实现3DS的StreetPass Relay擦肩HomePass
  5. NDS模拟器DeSmuME

留下回复